-
teInet模拟http协议post请求查看全部
-
teInet模拟http请求的结果查看全部
-
http的组成查看全部
-
teInet模拟http请求查看全部
-
http协议组成部分查看全部
-
无状态协议查看全部
-
HTTP协议是TCP/IP协议的子集查看全部
-
HTTP协议基于信息共享查看全部
-
无法按照视频中在telnet客户端中回车换行,只有将这两行代码复制过去直接回车才行。。查看全部
-
OB缓存+长连接实现客服聊天查看全部
-
OB缓存+长连接实现客服聊天查看全部
-
反向ajax http长链接 + Ob缓存输出查看全部
-
<?php ini_set('display_errors', '1'); error_reporting(E_ALL); $postData = array( 'test'=>1111 ); $postData = http_build_query($postData); $opts = array( 'http'=>array( 'method'=>"POST", 'header'=>"Content-type: aplication/x-www-form-urlencoded", 'content'=>$postData ) ); $content = stream_context_create($opts); //$res = @file_get_contents('http://localhost/http/index.php'); $fp = fopen('http://localhost/http/index.php','r',false,$content); echo $fp; fclose($fp); ?>查看全部
-
<?php ini_set('display_errors', '1'); error_reporting(E_ALL); $postData = array( 'test'=>'yujiahuan' ); $url = 'http://localhost/http/index.php'; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch,CURLOPT_POSTFIELDS,$postData); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $rtn = curl_exec($ch); curl_close($ch); echo $rtn; ?>查看全部
-
$postData = array( 'test'=>'yatru' ); $postData = http_build_query($postData); $fp = fsockopen('localhost',80,$errno,$errorStr,5); $request = "POST http://localhost/http/index.php HTTP/1.1\r\n"; $request .= "Host:localhost\r\n"; $request .= "Content-type:apllication/x-www-form-urlencoded\r\n"; $request .= "Content-length:".strlen($postData)."\r\n\r\n"; $request .= $postData; fwrite($fp,$request); while(!feof($fp)){//如果文件指针到了 EOF 或者出错时则返回 TRUE,否则返回一个错误(包括 socket 超时),其它情况则返回 FALSE。 echo fgets($fp,1024);// } fclose($fp);查看全部
举报
0/150
提交
取消