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 ",

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

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

    'User-Agent':'',

    'Referer':'',

     'content'=>$data

   )

)

$context=stream_context_create($opts);

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

?>

原文地址:https://www.cnblogs.com/paulversion/p/5511170.html