php文件里如何以get方式向远程URL 请问在flow.php文件中如何以get方式向远程URL(如http://www.site.com/url.php?user=xxx&time=XXX)提交请求不能用JS,只能在PHP中处理 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpvar_dump(file_get_contents('http://www.site.com/url.php?user=xxx&time=XXX'));?> 根据file_get_contents()返回的值去判断~~$flag = file_get_contents(); file_get_contents('http://www.site.com/url.php?user=xxx&time=XXX') //返回请求结果var_dump()//打印出结果 <?php// Create a stream$opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n" . "Cookie: foo=bar\r\n" ));$context = stream_context_create($opts);// Open the file using the HTTP headers set above$file = file_get_contents('http://www.site.com/url.php?user=xxx&time=XXX', false, $context);?> //$file是你用get请求的结果, 没有值时为false 方法多了1、用file或file_get_contents等2、用CURL系列的函数3、用Socket系列函数4、用fsockopen PHP调用MYSQL存储过程的问题 满分请教高手这段代码哪里有问题啊,高分跪求了 请教在smarty模版中如何 把数据库a上的表b读取出来,并把数据显示在页面上 求一小段PHP代码的改法 openssl.dll配置问题 哪里有PHP的免费空间呢,最好是PHP+MySQL数据库的 紧急求助...~~~~急,请帮忙,谢了 寻求高级代码 有两个问题请教?希望能得到帮助! 请教一个使用 pdfobject.js 在页面中显示PDF文件的问题 请问php中如何取得写入mysql数据库的错误代码 php从数据库中取图片 并三行三列排列
var_dump(file_get_contents('http://www.site.com/url.php?user=xxx&time=XXX'));
?>
$flag = file_get_contents();
file_get_contents('http://www.site.com/url.php?user=xxx&time=XXX')
//返回请求结果var_dump()
//打印出结果
// Create a stream
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n"
)
);$context = stream_context_create($opts);// Open the file using the HTTP headers set above
$file = file_get_contents('http://www.site.com/url.php?user=xxx&time=XXX', false, $context);
?> //$file是你用get请求的结果, 没有值时为false
1、用file或file_get_contents等
2、用CURL系列的函数
3、用Socket系列函数
4、用fsockopen