通过file_get_contents执行带参数的php

通过file_get_contents执行带参数的php

$time=date("Y:m:d:H:i:s");

$res=mysql_query($sql,$Con);

//给管理员发送短信

$url = "http://sms.api.bz/fetion.php?username=13609264728&password=04170728&sendto=13609264728&message='Thisisamessagetest!'";   

$result = file_get_contents($url);   

//echo $result; //返回信息默认为UTF-8编码的汉字,如果页面编码为gb2312,请使用下行语句输出返回信息。   

echo iconv("UTF-8", "GBK", $result);

>

这个php实现通过fetion客户端向用户手机发送短信的功能。

原文:

http://hi.baidu.com/susuper_/item/b107634743b152f0bdf45109

原文地址:https://www.cnblogs.com/mydomain/p/2727077.html