Challenge Transmission of Oi SMS message via HTTP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andersonjs
Forum Newbie
Posts: 3
Joined: Thu Jun 12, 2008 11:26 am

Challenge Transmission of Oi SMS message via HTTP

Post by andersonjs »

Good afternoon
I want to help develop a script to access a site and send sms message via php
http://torpedo.oiloja.com.br/wb/POi/POi ... do_mundooi

How to develop script and it works with cookie session to validate the correct image captcha

Curl or HTTP CONNECTION CLASS ...?

DA 11
NUM 85980628


REM ANDERSONJS
MSG TESTE123

Send these data in post-capture the image of the captcha and returned to automate the sending
recalling that the sending of the code will be done by human intervention


I am in Brazil and would like to help because I am a part of a group that is developing the script for sending Free Sms and would some tips because we are thinking of developing a tool that facilitates the sending of SMS, and we esbarrando in the cookie and captcha image

Something like http://www.etorpedo.com


In Group Discussion
http://forum.imasters.uol.com.br/lofive ... 62429.html
Attachments
&lt;?php<br />$image_url = &quot;http://torpedo.oiloja.com.br/captcha.jsp&quot;;<br />$ch = curl_init();<br />$timeout = 0;<br />curl_setopt ($ch, CURLOPT_URL, $image_url);<br />curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);<br /><br />// Getting binary data<br />curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);<br /><br />$image = curl_exec($ch);<br />curl_close($ch);<br /><br />// output to browser<br />header(&quot;Content-type: image/png&quot;);<br />print $image;<br />?&gt;
<?php
$image_url = "http://torpedo.oiloja.com.br/captcha.jsp";
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $image_url);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);

// Getting binary data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);

$image = curl_exec($ch);
curl_close($ch);

// output to browser
header("Content-type: image/png");
print $image;
?>
captcha.jpg (84.27 KiB) Viewed 157 times
Last edited by Weirdan on Thu Jun 04, 2009 5:02 pm, edited 1 time in total.
Reason: Removed part in Portuguese
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Challenge Transmission of Oi SMS message via HTTP

Post by Ollie Saunders »

Where do you get the answer from? That URL your using http://torpedo.oiloja.com.br/captcha.jsp is generating the image but your code is going to need to know what the answers is as a string.
Post Reply