open(get,http://localhost/xxx.php?id=2,false); $xhr->send(); echo $xhr->responsetext
2,file_get_contents方法
3,fopen->fread->fclose
4,curl方法
注意: 1,使用file_get_contents和fopen必须空间开启allow_url_fopen。方法:编辑php.ini,设置 allow_url_fopen = on,allow_url_fopen关闭时fopen和file_get_contents都不能打开远程文件。
2,curl方法,则需要开启curl。方法:windows下修改php.ini,将extension=php_curl.dll前面的分号去掉,拷贝 ssleay32.dll和libeay32.dll到c:/windows/system32下;linux下安装curl扩展就可以了。