php獲取url內(nèi)容 php請(qǐng)求url并接收返回值?
php請(qǐng)求url并接收返回值?$ch=curluuinit()curlusetopt($ch,CURLOPTuurl,$uri)curlusetopt($ch,CURLOPTuupost,1)//設(shè)置
php請(qǐng)求url并接收返回值?
$ch=curluuinit()
curlusetopt($ch,CURLOPTuurl,$uri)
curlusetopt($ch,CURLOPTuupost,1)//設(shè)置為Post
curlusetopt($ch,CURLOPTuheader,0)
curlusetopt($ch,CURLOPTureturntransfer,1)
curlsetopt($ch,CURLOPTupostfields,$data)//data是post請(qǐng)求的參數(shù)
$return=curlExec($CH)//$return是收到的返回值
curlclose($CH)