0

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.

3
  • 2
    will you show ur code atleast Commented Dec 18, 2012 at 7:13
  • What have you tried so far? Post your code here for others to go through it. Commented Dec 18, 2012 at 7: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 Commented Dec 18, 2012 at 7:14

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

use CURL .See http://php.net/manual/en/book.curl.php for more details

1 Comment

I think Curl will solve the problem...thanks, il try it out and then again get back to you.
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.