php灌水

<?php

$data=array('name'=>'paul','mail'=>'paulversion@163.com')

$data=http_build_query($data);

$opts=array(

 'http'=>array(

  'method'=>'Post',

   'header'=>"Content-type:application/x-www-form-urlencode\r\n",

   'Content-Length':".strlen($data)."\r\n",

   'Cookie':'',//现在浏览器中提交获取相应的Cookie User_Agent,Referer的值

    'User-Agent':'',

    'Referer':'',

     'content'=>$data

   )

)

$context=stream_context_create($opts);

$html=file_get_contents(url,false,$context)//url为灌水需要提交的地址

?>

 

posted on 2016-05-20 10:27  paulversion  阅读(163)  评论(0编辑  收藏  举报