How to scrape page requiring cookies and javascript in PHP
问题 Is there an easy way to emulate cookies and javascript with a php script scraping a web page requiring it? The current response shows: <body><noscript>This site requires JavaScript and Cookies to be enabled. Please change your browser settings or upgrade your browser.</noscript></body> I put this in the code and it made no difference: $strCookie = 'PHPSESSID=' . $_COOKIE['PHPSESSID'] . '; path=/'; curl_setopt( $ch, CURLOPT_COOKIE, $strCookie ); 回答1: HTML inside the <noscript> </noscript> will