You need to enable curlphp for windows testing on the local machine. iniextensionphp_curl.dll restart apacheinclude (Curl. php); $ cunewQP_Curl_Curl (); $ s $ cu-get (www.baidu.com); echo $ s; Curl. php can use the Curl component in the framework www.myquickphp.com. php *** CURL Tool
In windows testing, you need to enable curl php. ini extension = php_curl.dll restart apache include ('curl. php '); $ cu = new QP_Curl_Curl (); $ s = $ cu-get ('HTTP: // www.baidu.com'); echo $ s; Curl. php can use the curl.php/*** CURL tool in the framework of http://www.myquickphp.com/
For windows testing on the local machine, you need to enable curl php. ini.
Extension = php_curl.dll
Restart apache
include ('Curl.php');$cu=new QP_Curl_Curl();$s=$cu->get('http://www.baidu.com');echo $s;
Curl. php can use curl.php in the framework of http://www.myquickphp.com/
/*** CURL tool ** @ category QuickPHP (II) * @ copyright http://www.myquickphp.com * @ version $ Id: Curl. php 904: 02Z yuanwei $ * // ** ================== the following functions are supported ================ 1: supports ssl connections and proxy connections. 2. automatic support for cookies. 3. Simple GET/POST operations. 4. Support for uploading a single file or multiple files with the same field, supports relative or absolute paths. 5: Server Information and server Header information before and after the request are returned. 6: The lighttpd server is automatically supported. 7: the REFERER reference page is automatically set. 8: automatically supports Server 301 redirection or rewriting (thanks to Zheng GG) 9: other options, such as custom port, timeout, USERAGENT, Gzip compression, etc. ========================================/// obtain the CURL object $ cu = QP_Sys:: load ('curl'); // obtain the content of the baidu homepage echo $ cu-> get ('HTTP: // www.baidu.com '); // send it to http ://
/A. php sends POST Data echo $ cu-> post ('HTTP ://
/A. php', array ('id' => 1, 'name' => 'v go'); // to http ://
/Upload. php upload File echo $ cu-> post ('HTTP ://
/. Php ', array (), array ('img' => 'file/a.jpg '); // obtain all debugging information print_r ($ cu-> getinfo ()); // set the callback (common function) echo $ cu-> set (array ('callback' => 'print _ R')-> get ('HTTP ://
/Get. php ', array ('id' => 10); // sets the callback (Controller method) echo $ cu-> set (array ('callback' => array ($ this, 'curllog')-> get ('HTTP ://
/Get. php ', array ('id' => 10); // sets the callback (static method) echo $ cu-> set (array ('callback' => array ('qp _ Sys ', 'dump')-> get ('HTTP ://
/Get. php', array ('id' => 10 ));*/