If your phone is an android, you can use an application, such as SMS Gateway API , which will turn your phone into an SMS gateway and allow you to send and receive messages via PHP.
$URL = "http://v2.smsgateway.me/API/Send/Single.php"; $postdata = http_build_query( array( 'Username' => " foo@bar.co.uk ", 'Password' => "password", 'Number' => "+447791064782", 'Message' => "Hello World!", 'Device' => 1, //Send from device 1 (optional) 'SendAt' => (time() + (60 * 60)), //Send in 1 hours time (optional) 'ExpireAt' => (time() + (60 * 60 * 2)) //Expire in 2 hours time (optional) ) ); $opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata)); $context = stream_context_create($opts); $result = file_get_contents($URL, false, $context); echo $result;
source share