Page 1 of 1

URL Request Without redirecting page

Posted: Tue Jan 27, 2009 2:12 am
by iris
I ve no idea of a way to Call a page that sends SMS through url parameters

http://www.sendsms.com/send.php?usernam ... r=phonenum

When the page is called from a processing page it sends the messages in the mess parameter.

The problem now is, i would like to send SMS to more than one recipient calling from a loop of phone numbers but the first request takes me away from the processing page cos i m using header("location: http://www.sendsms.com/send.php?usernam ... r=phonenum") to send the message.

how can it be done without redirecting from the processing page

Note: The SMS page "www.sendsms.com/send.php" is a third party page i pay for and i have no access to its contents

Re: URL Request Without redirecting page

Posted: Tue Jan 27, 2009 1:14 pm
by pl_towers
I had a similair issue once, i used the file_get_contents() function, worked for me.

Re: URL Request Without redirecting page

Posted: Mon Feb 02, 2009 8:52 am
by iris
I had a similair issue once, i used the file_get_contents() function, worked for me.

Pls, can you explain how you used it in code i realy need it urgently. i have tried similar things but it does nt seem to work.

Thanks.

Re: URL Request Without redirecting page

Posted: Fri Feb 06, 2009 5:43 am
by pl_towers
in your while() loop instead of using header("location: http://www.google.com") use file_get_contents("www.google.com")

the file_get_contents() will call the page and return its content, which will in your case send a message at the same time.

If you still have issues post your code and ill add it in

Re: URL Request Without redirecting page

Posted: Fri Feb 06, 2009 6:18 am
by susrisha
have you tried doing the same using curl?? Its a lot better than redirecting the user to the page. You can have multiple curl executions and then get the result and display / do whatever you want with the returned page contents. try posting your code and i will get the proper code for the curl execution.