Skip to content

Instantly share code, notes, and snippets.

@mmanishh
Created December 8, 2015 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmanishh/005d752470b295c7447c to your computer and use it in GitHub Desktop.
Save mmanishh/005d752470b295c7447c to your computer and use it in GitHub Desktop.
<?php
$message = array("Alert! EarthQuake is likely to occur within 15 mins.", "Hi! from Manish", "Wassup ?");
$pos =mt_rand(0,count($message));
$api_url = "http://api.sparrowsms.com/v2/sms/?".
http_build_query(array(
'token' => 'QRtl8w1FQvlVqcrWrkHv ',
'from' => 'Demo',
'to' => '9843677237,9813281380,9803716425,',
'text' => $message[$pos]));
$response = file_get_contents($api_url);
echo $response;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment