I am working on a little project with Curl and PHP to scrape the results of Google Scholar. It works fine in my development mode but when I try in a production mode something is not working and there is no result...
Here is my code:
// SCRAPING GOOGLE SCHOLAR
if (isset($_POST['google'])){
$googleURL = 'http://scholar.google.com/scholar?hl=fr&q=' . $url_subject;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $googleURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $random->random_user_agent());
$result = curl_exec ($ch);
curl_close($ch);
$html = $this->container->get('simple_html_dom');
$html->load($result);
Thank you for your help