Problems with cURL and PHP. Please help :)

Discussion in 'PHP' started by inkymike, Dec 9, 2006.

  1. #1
    Hi boys and girls,

    I'm using cURL and PHP to download data from my business partners websites. This is all working well except in one case.

    Check out http://www.eyeonmogs.com/mike/testBrogame.php, you an see the first two connections are successful and download data - the latter fails to connect.

    Interestingly this works fine from my localhost...

    It's possible this is an IP blocking issue (which I'll be checking on Monday), however I bring it up here as this last data grab posts some post variables for authentication. This works well on my local machine.

    Any chance that my host might have disabled the post variables in cURL for some reason? Or any otehr thoughts why this might be causing an issue?

    Thanks in advance eveyone,

    Mike
     
    inkymike, Dec 9, 2006 IP
  2. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this.

    error_reporting(E_ALL);
    Code (markup):
    It might help you understand better.
     
    tanfwc, Dec 9, 2006 IP
  3. Nikolas

    Nikolas Well-Known Member

    Messages:
    1,022
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    150
    #3
    Also try these directives :

    
    set_time_limit(0);//As the script may time out
    
    curl_setopt($ch, CURLOPT_TIMEOUT, 50);//Because the curl request can also time out :)
    
    PHP:
     
    Nikolas, Dec 9, 2006 IP
  4. inkymike

    inkymike Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the suggestions guys.

    Not yeilded anything more I'm afraid though :confused:
     
    inkymike, Dec 9, 2006 IP