L
L
linuxnb2018-02-26 18:29:47
PHP
linuxnb, 2018-02-26 18:29:47

What's the problem with curl parsing?

Good time of the day, I'm trying to parse the Cinemark site,
but when parsing, it knocks out the city, although the city's cookie and user agent are indicated, what could be the problem?

<?php
  if( $curl = curl_init() ) {
    curl_setopt($curl, CURLOPT_URL, 'http://www.cinemapark.ru/multiplexes/show/1/');
    curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
    $userAgent = 'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0';
 
  
    curl_setopt( $curl, CURLOPT_USERAGENT, $userAgent );
    curl_setopt($curl, CURLOPT_COOKIE, "user_geo_city=1");
    $out = curl_exec($curl);
    echo $out;
    curl_setopt($curl, CURLOPT_COOKIE, "user_geo_city=1");
    $out = curl_exec($curl);
    echo $out;

    curl_close($curl);
  }
?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivankomolin, 2018-02-27
@ivankomolin

Getting data from the URL www.cinemapark.ru/multiplexes/show/1 using curl is possible even without specific settings, cookies and user agent. It is enough to make a request with standard settings.
Another thing is that there is no schedule in the data for this address.
If you need it, then look carefully where it comes from.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question