September 30, 2012

way2sms php script

Last Update on 17/Jan/2013

<?php
$to=$_GET['to'];
$msg=$_GET['msg'];
$user=$_GET['user'];
$pass=$_GET['pass'];
$nos=explode(",",$to);
foreach($nos as $to)
{
$ch = curl_init("http://site5.way2sms.com/Login1.action");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, "username=$user&password=$pass&userLogin=yes&button=Login");
$response = curl_exec($ch);
curl_close($ch);
list($header, $body) = explode("\r\n\r\n", $response, 2);
$jid=explode("JSESSIONID=",$header);
$jid=explode(";",$jid[1]);
$jid=$jid[0];
$e=explode("~",$jid);
$e=$e[1];
$ch = curl_init("http://site5.way2sms.com/jsp/InstantSMS.jsp");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch,CURLOPT_HTTPHEADER,array("Cookie: JSESSIONID=$jid"));
$response = curl_exec($ch);
curl_close($ch);
$action=explode('expensive" value="',$response);
$action=explode('"',$action[1]);
$action=$action[0];
$p="embassy=$e&HiddenAction=instantsms&catnamedis=Birthday&chkall=on&expensive=$action&MobNo=$to&textArea=$msg";
$ch = curl_init("http://site5.way2sms.com/quicksms.action");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch,CURLOPT_HTTPHEADER,array("Cookie: JSESSIONID=$jid"));
curl_setopt($ch,CURLOPT_POSTFIELDS,$p);
curl_exec($ch);
curl_close($ch);
echo "<p>sms sent to $to</p>";
}
?>


download script here http://files.mspn.in/952185

singlesms usage w2s.php?user=your mobile number&pass=your password&to=destination mobile number&msg=your message ;)
multisms usage  w2s.php?user=your mobile number&pass=your password&to=mobilenumber1,mobilenumber2,mobilenumber3&msg=your message

share your feedbacks 




20 comments:

  1. thanz maan its works.. now upload index.html form

    ReplyDelete
  2. Replies
    1. update script with multiple number sending like 9090909090,9999999999,8989898998

      Delete
  3. dear its not working..
    Kindly check out this one

    http://instru-rocks.100webspace.net/blog_sms/w2s.php?user=XXXXXXXXXXX&pass=XXXXXp&to=XXXXXXXXXXX&msg=XXXXXX

    ReplyDelete
  4. Thanks buddy, it is still working in 2012

    ReplyDelete
    Replies
    1. we can make it working at any situation unless way2sms put a captcha while sending sms,but if they do like this, all users will leave their site,no one wants captcha in freesms sites.

      good luck

      Delete
    2. Thanks Dear Brother, I struggled from last two days that has some curl setting, which was not supported by my host, you and your this script is geninus. thanks for your work,, just wanted to know how I can send sms to multiple receipints from your script.
      Regards,
      Mahendra

      Delete
    3. i will release it few days, stay tuned for all freesms sites scripts single,multiple receipiants

      Delete
  5. getting error===>

    Notice: Undefined offset: 1 in \w2s.php on line 25
    Done

    ReplyDelete
  6. post updated :) way2sms keep on changing their whisper pads :D

    ReplyDelete
  7. Dear brother, earlier your script was running, but today it is not sending sms, Please look into this if time permits.

    Regards,
    Mahendra

    ReplyDelete
  8. now its not working plz fix this code ?? :)

    ReplyDelete
  9. Can anyone provide youmint.com script, i am starting a web service for my customers.

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. friend send free sms

    working now... 100%



    click:

    http://www.ansarism.tk


    any friends used this sms script
    contact me..


    ReplyDelete