1, Local machine:
<>< span="">
$uri = "http://www.jbxue.com/test.php";//replace it with the address of your own server
Parameter array
$data = Array (
' Name ' = ' Tanteng '
' Password ' = ' password '
);
$ch = Curl_init ();
Print_r ($ch);
curl_setopt ($ch, Curlopt_url, $uri);
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, Curlopt_header, 0);
curl_setopt ($ch, Curlopt_returntransfer, 1);
curl_setopt ($ch, Curlopt_postfields, $data);
$return = curl_exec ($ch);
Curl_close ($ch);
Print_r ($return);
2, remote server:
<>< span="">
if (isset ($_post[' name ')) {
if (!empty ($_post[' name ')) {
echo ' Hello, ', $_post[' name ']. '! ';
}
}
http://www.bkjia.com/PHPjc/687414.html www.bkjia.com true http://www.bkjia.com/PHPjc/687414.html techarticle 1, Local machine: $uri = "http://www.jbxue.com/test.php";//the address of your own server//parameter array $data = Array (' name ' = ' Tanteng '//' password ' = ' password ') ...