PHP Curl can not connect to 8081

Discussion in 'PHP' started by bean81, Oct 16, 2010.

  1. #1
    i want build express site and need get search result,Now in browser i could visit http://115.238.55.94:8081/result.aspx?wen=4535,when i use PHP curl i can not get result,and appear couldn't connect to host.
    blew is script,using another domain it could run.please give me some advice thanks
    <?php
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_PORT, 8081);
    curl_setopt($curl, CURLOPT_URL, 'http://115.238.55.94:8081/result.aspx?wen=4535');
    curl_setopt($curl, CURLOPT_HEADER, 1);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_TIMEOUT, 15);
    $data = curl_exec($curl);
    var_dump($data);
    var_dump(curl_error($curl));
    curl_close($curl);
    ?>
     
    bean81, Oct 16, 2010 IP
  2. dowhile

    dowhile Active Member

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #2
    This script is running perfect. Check if you have curl enabled.
     
    dowhile, Oct 16, 2010 IP
  3. bean81

    bean81 Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    bean81, Oct 16, 2010 IP