可以使用以下函數(shù)來實現(xiàn):??
function?posttohost($url,?$data)?{?
$url?=?parse_url($url);?
(!$url)? 'URL? ?? ??? ? ??'? ???? ??;?
if?(!isset($url['port']))?{?$url['port']?=?"";?}?
if?(!isset($url['query']))?{?$url['query']?=?"";?}??
$?????=?"";??
while?(list($k,$v)?=??($data))?{?
$?????.=?($encoded???"&"?:?"");?
$?????.=?rawurlencode($k)."=".rawurlencode($v);?
}??
$fp?=?fsockopen($url['host'],?$url['port']???$url['port']?:?80);?
(!$fp)? "$url[host]? ?? ??? ?? ?????"? ???? ??;??
fputs($fp,?sprintf("POST?%s%s%s?HTTP/1.0n",?$url['path'],?$url['query']???"?"?:?"", $url['??']));?
fputs($fp,?"???:?$url[host]n");?
fputs($fp,?"??? ??:?application/x-www-form-urlencodedn");?
fputs($fp,?"??? ??:?"?.?strlen($encoded)?.?"n");?
fputs($fp,?"??:?closenn");??
fputs($fp,?"$encodedn");??
$line?=?fgets($fp,1024);?
if?(!eregi("^HTTP/1..?200",?$line))?return;??
$results?=?"";?$inheader =?1;?
while(!feof($fp))?{?
$line?=?fgets($fp,1024);?
if?($inheader?&&?($line?==?"n"?||?$line?==?"rn"))?{?
$inheader?=?0;?
}?
elseif?(!$inheader)?{?
$results?.=?$line;?
}?
}?
fclose($fp);??
$results? ?????.?
}?
?>?
---------------------------------- ------------------------------------- -?
也可以這樣??
$URL="www.mysite.com/test.php";?
$ch?=?curl_init();?
curl_setopt($ch,?CURLOPT_URL,"https://$URL");?
curl_setopt($ch,?CURLOPT_POST,?1);?
curl_setopt($ch,?CURLOPT_POSTFIELDS,?"Data1=???&Data2=???");?
curl_exec($ch);?
curl_close($ch);?
?>?
? ?? ??? ????. ??>

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)