php获取url内容 php请求url并接收返回值?

php请求url并接收返回值?$ch=curluuinit()curlusetopt($ch,CURLOPTuurl,$uri)curlusetopt($ch,CURLOPTuupost,1)//设置

php请求url并接收返回值?

$ch=curluuinit()

curlusetopt($ch,CURLOPTuurl,$uri)

curlusetopt($ch,CURLOPTuupost,1)//设置为Post

curlusetopt($ch,CURLOPTuheader,0)

curlusetopt($ch,CURLOPTureturntransfer,1)

curlsetopt($ch,CURLOPTupostfields,$data)//data是post请求的参数

$return=curlExec($CH)//$return是收到的返回值

curlclose($CH)