99麻豆久久久国产免费福利精品,国产精品成人国产乱,玖玖操,手机看片169,国产精彩视频在线观看,午夜亚洲福利视频,国产伦乱视频

龍巖易富通網(wǎng)絡(luò)科技有限公司

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

php模擬提交數(shù)據(jù)

2015.09.10 | 594閱讀 | 0條評(píng)論 | php

php利用fsockopen模擬提交數(shù)據(jù),以下舉例是模擬提交龍巖seo留言板 

[php] 

$sock = fsockopen("ppmak.com", 80, $errno, $errstr, 30); 

if (!$sock) die("$errstr ($errno)\n"); 

$data = "comment=龍巖seo&author=test&email=test@qq.com&url=http%3A%2F%2F0597seo.com&comment_post_ID=374&comment_parent=0&comment_post_ID=374"; 

fwrite($sock, "POST /wp-comments-post.php HTTP/1.0\r\n"); 

fwrite($sock, "Host: ppmak.com\r\n"); 

fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n");

fwrite($sock, "Content-length: " . strlen($data) . "\r\n");

fwrite($sock, "Accept: */*\r\n"); 

fwrite($sock, "\r\n"); 

fwrite($sock, "$data\r\n"); 

fwrite($sock, "\r\n"); 

$headers = ""; 

while ($str = trim(fgets($sock, 4096)))     

   $headers .= "$str\n"; echo "\n"; $body = ""; 

   while (!feof($sock))     

      $body .= fgets($sock, 4096); 

   fclose($sock); 

   echo $body; 

[/php]


贊 (

發(fā)表評(píng)論

宁明县| 桐乡市| 山阴县| 开远市| 钟山县| 疏勒县| 苏尼特左旗| 佛坪县| 阿拉尔市| 卓资县| 多伦县| 榕江县| 同德县| 雷州市| 犍为县| 白山市| 博罗县| 浮梁县| 仁布县| 卓资县| 成都市| 临海市| 巨鹿县| 桦南县| 九江市| 方山县| 错那县| 西宁市| 阳山县| 那坡县| 纳雍县| 黄石市| 包头市| 瓦房店市| 探索| 阿克苏市| 永城市| 常德市| 临沧市| 镇沅| 临漳县|