Ask for a program idea and related code
I would like to make a website feature such as http://www.ccua.com.cn/
Ask this webmaster, but he won't reveal a bit
I have no idea, can I have a master enlighten one or two?
------Solution--------------------
Capture content with Curl
It was originally collected through file_get_contents ($url). Helpless, out of a coding failure is always impossible to solve. Finally choose Curl Implementation. With curl you need to copy the Libeay32.dll and ssleay32.dll two files under PHP to System32, and then the extension = Php_curl.dll in php.ini is turned on.
A code example is shown below.
PHP Code
function Generatehtmlbycurl ($url, $filename) { $ch = Curl_init (); $timeout = 1000; Set to 0 for no timeout curl_setopt ($ch, Curlopt_url, $url); curl_setopt ($ch, Curlopt_returntransfer, 1); curl_setopt ($ch, Curlopt_timeout, $timeout); $handles = curl_exec ($ch); Curl_close ($ch); File_put_contents ($filename, $handles); }