| function post2($url,$data){ $context = array( 'http'=>array( 'method'=>'POST', 'header'=>'Content-type: application/x-www-form-urlencoded'."rn". 'User-Agent : Jimmy’s POST Example beta'."rn". 'Content-length: '.strlen($data)+8, 'content'=>'mypost='.$data) ); $stream_context = stream_context_create($context); $data = file_get_contents($url,FALSE,$stream_context); return $data;} |