Don't get the answer to get the request.



  • I can't tell you. Get Server request http://sypexgeo.net/ru/api/

    Code:

    $ch = curl_init("http://api.sypexgeo.net/xml/123.45.67.89");
    $content = curl_exec( $ch );
    $info =  curl_getinfo( $ch );
    var_dump($info); 
    var_dump($content); 
    

    $content returns false$info contains a mass:

    array(21) { ["url"]=> string(40) "http://api.sypexgeo.net/xml/123.45.67.89" ["content_type"]=> NULL ["http_code"]=> int(0) ["header_size"]=> int(0) ["request_size"]=> int(0) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0) ["namelookup_time"]=> float(0) ["connect_time"]=> float(0) ["pretransfer_time"]=> float(0) ["size_upload"]=> float(0) ["size_download"]=> float(0) ["speed_download"]=> float(0) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0) ["redirect_time"]=> float(0) ["certinfo"]=> array(0) { } 
    


  • There may be a need to add the dope for the opaque curl Request. How to try:

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.125 Safari/533.4");
    

    If the job comes out on a homemade, on a free-of-charge basis, it's out. allow_url_fopen♪ For various reasons

    If there's work going on at the local host, we need to make sure it's built. php.ini It's worth the building. allow_url_fopenwhich enables work with curl and the


Log in to reply
 


Suggested Topics

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