I want to call a 3rd party URL, this URL is given to me by my SMS portal which is used to send SMS to end users.
Now the problem is that when I call this URL through PHP the state changes and I'm redirected to that page, is there any method by which we can call this URL again and again, the reason I want to call the URL so many times is because there can be 1000 users so in the URL I have to mention the name of the user and there phone number.
This process should be asynchronous.
Asked
Active
Viewed 2,526 times
0

Abhishek Yadav
- 1
- 1
- 1
-
2will you show ur code atleast – rOcKiNg RhO Dec 18 '12 at 07:13
-
What have you tried so far? Post your code here for others to go through it. – web-nomad Dec 18 '12 at 07:14
-
What have you tried, with `PHP` you could call a URL using `file_get_contents()`, `curl`, etc... Maybe try looking at one of those – PhearOfRayne Dec 18 '12 at 07:14
3 Answers
1
What about exec() ?
Something like:
$code = escapeshellarg("file_get_contents('http://www.site.com/etc...');");
exec("php -r {$code} > /dev/null 2>&1 &");
More info about those arguments.

Community
- 1
- 1

Alain Tiemblo
- 36,099
- 17
- 121
- 153
0
use CURL .See http://php.net/manual/en/book.curl.php for more details

user7282
- 5,106
- 9
- 41
- 72
-
I think Curl will solve the problem...thanks, il try it out and then again get back to you. – Abhishek Yadav Dec 18 '12 at 07:41
0
You can make another script that will send the request and you can then run it from your main script with a shell command by appending &
or | at now
at the end of the command to move the process in to background.

Ranty
- 3,333
- 3
- 22
- 24