CURL



  • There's a crypt that cUrl is requesting data from the site. For example:

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://site.ru/get_orders.php");
    curl_setopt($ch, CURLOPT_VERBOSE, 1);
    $pg = curl_exec($ch);
    $info = curl_getinfo($ch);
    curl_close($ch);
    

    Problem: performance is always the same, i.e. variable $pg The same content.

    In this case, if a link is opened through the browser http://site.ru/get_orders.php I'm sure it's okay.

    I tried to change. CURLOPT_URL on the website. It pumps, looks html. I return to get_orders.php shows the same thing. I've been trying to knock out the source site, and CURL has returned the same meaning.
    Feels like there's a result somewhere. Where is it?

    Any ideas?

    Result curl_getinfo:

    * About to connect() to .....ru port 80 (#0)
    *   Trying ... ... * connected
    > GET /get_orders.php HTTP/1.1
    Host: ....ru
    Accept: */*
    Cache-Control: no-cache
    

    < HTTP/1.1 200 OK
    < Server: nginx/1.6.3
    < Date: Tue, 15 Dec 2015 14:51:09 GMT
    < Content-Type: text/html; charset=utf-8
    < Content-Length: 10
    < Connection: keep-alive
    < X-Powered-By: PHP/5.3.29
    <

    • Connection #0 to host .....ru left intact
    • Closing connection #0

    I tried to run the curl through the ssh:

    curl site:ru/get_orders.php

    and he gave it back.

    file_get_contents()

    too.

    It's definitely some kind of cashing. ♪ ♪
    Any ideas?



  • Got a reason. It wasn't about cashing:

    The problem was, working through SSH, he knocked IPv6 on another server. So, when I opened through the browser, I went to a local servak (i.e. ip only) and via SSH, the request went to another earring.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2