Official Site

click here to view our new site launched

Pages

Showing posts with label fullonsms. Show all posts
Showing posts with label fullonsms. Show all posts

Friday, April 27, 2012

WAYSMS API PHP


  function sendSMS($url) {
    $userAgent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_FAILONERROR, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_AUTOREFERER, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 1000);
    $html = curl_exec($ch);
    if (!$html) {
        echo "
CURL Page: " . $url;

        echo "
CURL Error Number: " . curl_errno($ch);

        echo "
CURL Error Desc: " . curl_error($ch);

        return FALSE;
    } else {
        return trim($html);
    }
    }
   
// Note: provider can be changed by setting $provider  to any of the provider say 'fullonsms'
    $toMobile ='Recipient number';
    $message=urlencode("hello world");
    $uid='Your mobile no';
    $password='Password';
    $provider='way2sms';


$url="http://ubaid.tk/sms/sms.aspx?uid=$uid&pwd=$password&msg=$message&phone=$toMobile&provider=$provider";
  
 if(sendSMS($url)=='1')
echo'\n Message sent...!';


/* Note:
List of Providers: way2sms, fullonsms, smsindia, whozzat, smsinside, site2sms
*/

$2.49 .COM at GoDaddy.com! Expires 5/14/13