php简易灌水

<?php
$data = array ('content' => '白菜大侠','itemid'=>58);
$data = http_build_query($data);
$opts = array (
'http'=>array(
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n" .
"Content-Length: " . strlen($data) . "\r\n",
'content' => $data)
);
$context = stream_context_create($opts);
$html = @file_get_contents('http://168.192.122.29:8060/news/addcomment', false,
$context);
?> 

 

posted @ 2014-04-01 18:04  jami918  阅读(228)  评论(0编辑  收藏  举报