Shoutbox

PHP Question - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: PHP Question (/showthread.php?tid=52641)

PHP Question by leito on 11-05-2005 at 01:30 AM

Hey guys, its me again asking a PHP question. This time I need help in what to search. All mobile phone companies in Guatemala have html forms to send SMS to their phones.

What I want is to send the same data to their site(using a form on my site), capture the confirmation screen and print a result based on the confirmation. All this without the user knowing I used the companies site. In this way I could send message to all 4 companies from just one form.

Hope you understand it, I guess I need to speak english more often. Hahaha, Bye! Thank you in advance for your answer.


RE: PHP Question by thc2010 on 11-05-2005 at 01:32 AM

I also want to know how this is done


RE: PHP Question by -dt- on 11-05-2005 at 01:50 AM

well I recomend using curl to do it because its super simple.

code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0); //dont put the header recived into the data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //to not echo the data back
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, 'blah=xxxx&moo=444'); //post string.
$foo = curl_exec($ch); //foo is now filled with the page it returned.
curl_close($ch);


for further reading on curl http://php.net/curl

well do you know what data you need to send?
if you dont download live http header extention
goto the site you want to view the headers for  click tools , Live Http Headers
then a window will appear and you should be able to figure out how to read the POST from there.
RE: PHP Question by leito on 11-08-2005 at 04:17 AM

Thanks -dt- I guess this is just what I was looking. It seems very complete! Thank you very much!

-dt-, I want to put your name in the "thanks to" part of the site. Maybe you could send me a PM or answer here.

This is the final product, http://sms.leonelgalan.com/ it's for Guatemala only, sorry.

If you live in Central America, I'll be glad to talk to you about implementing the site for your country. Thanks all for your help


RE: PHP Question by -dt- on 11-08-2005 at 08:17 AM

quote:
Originally posted by leito
-dt-, I want to put your name in the "thanks to" part of the site. Maybe you could send me a PM or answer here.
thanks...
Matt Labrum . :P