<div id="form">
<form method="post" action="transfer.php/" enctype="multipart/form-data" name="form1" id="form1">
<textarea style="width: 50%" name="code" id="code" rows="17"
οnfοcus="textfocus()"
οnblur="textblur()">请输入:</textarea><br />
</form></div>
<?php
sleep(1);
$re=$_REQUEST["code"];
$receive =stripslashes($re);
$data = array(
'code' => $receive,
'simplot' => 'Run the code'
);
//$post_data= http_build_query($data);
$post_data= http_build_query($data);
$url = "http://www.example.com/";
$cookie_file = tempnam('./temp','cookie');
// 参数数组
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $url);
curl_setopt ( $ch, CURLOPT_HEADER, 1);
curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ($ch, CURLOPT_POSTFIELDS,$post_data);
curl_setopt ($ch, CURLOPT_TIMEOUT,10);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_exec ( $ch );
curl_close ( $ch );
$ch1 = curl_init($url);
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_COOKIEFILE, $cookie_file);
$contents = curl_exec($ch1);
curl_close($ch1);
preg_match("/>(.*)<\/p>/",$contents,$arr);
echo $arr[0];
fclose($temp);
?>