where to run curl or wget commands???

Discussion in 'PHP' started by demonator09, Sep 21, 2008.

  1. #1
    I am really sorry for this silly question but i am new to this
    i found some curl and wget commands on the net
    but i dont know where to run them
    show i run them through a php file or anywhere else??
    can anyone please tell me.

    thanks
     
    demonator09, Sep 21, 2008 IP
  2. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hamidof, Sep 21, 2008 IP
  3. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #3
    From what it sounds, most likely you don't have ssh. If your host allows you to run exec(), use wget with that.
     
    Kaizoku, Sep 21, 2008 IP
  4. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #4
    Here is the simplest curl example in PHP :
    <?php
    $ch=curl_init();
    curl_setopt($ch,CURLOPT_URL,'http://something.com');
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    $result=curl_exec($ch);
    curl_close($ch);
    ?>
    PHP:
     
    xrvel, Sep 24, 2008 IP