To use curl, You need to enable it in php. ini on the Windows server. Open php. ini and find extensionphp_curl.dll to remove the preceding comment. The implementation code is as follows: $ curlcurl_init (); $ urlwww.smdcn.net; curl_setopt ($ curl, CURLOPT_URL, $ url); Set URLcurl_se
To use curl, You need to enable it in php. ini on the Windows server. Open php. ini and find: extension = php_curl.dll. Remove the preceding comment. Implementation Code: $ curl = curl_init (); $ url = http://www.smdcn.net; curl_setopt ($ curl, CURLOPT_URL, $ url); // set URL curl_se
To use curl, you must enable it in php. ini> <on a Windows Server, open php. ini and find:
Extension = php_curl.dll
Remove the preceding annotations.
The implementation code is as follows:
$ Curl = curl_init ();
$ Url = 'HTTP: // www.smdcn.net ';
Curl_setopt ($ curl, CURLOPT_URL, $ url); // sets the URL
Curl_setopt ($ curl, CURLOPT_HEADER, 1); // get the Header
Curl_setopt ($ curl, CURLOPT_NOBODY, true); // We just need Head
Curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, 1); // Save the data to a string. Don't output it to the screen.
$ Data = curl_exec ($ curl); // start execution ~
Echo curl_getinfo ($ curl, CURLINFO_HTTP_CODE); // I know the HTTPSTAT code ~
Curl_close ($ curl); // when used up, remember to turn it off.