For some small questions about curl, please refer to how to capture a part of the content of a web page... no idea .... for example, I want to capture the table in mmcfood.1x.net... none of the above .., PHPcode $ ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL, some minor issues with 'http curl
Ask how to capture a part of a web page... no idea ....
For example, if I want to capture the table in mmcfood.1x.net... none of the above ..
------ Solution --------------------
PHP code
$ Ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL, 'http: // mmcfood.1x.net/'); curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ ch, CURLOPT_USERAGENT, 'mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: 1.9.1.2) Gecko/20090729 Firefox/3.5.2 gtb5 '); $ htmls = curl_exec ($ ch); curl_close ($ ch); preg_match ("#
# Is ", $ htmls, $ matches); echo $ matches [0];