利用Curl、socket、file_get_contents POST数据

array( ‘method’=>‘POST’, ‘header’=>‘Content-type: application/x-www-form-urlencoded’."\r\n". ‘User-Agent : Jimmy's POST Example beta’."\r\n". ‘Content-length: ‘.strlen($post_string)+8, ‘content’=>‘mypost=’.$post_string) ); $stream_context = stream_context_create($context); $data = file_get_contents($remote_server,FALSE,$stream_context); return $data; } ?> 转自 http://hi.baidu.com/xsite/blog/item/1ae57963be3e38680d33fa6b.html

2009-04-06 · 1 分钟 · admin