Running a script without a browser, possible?

Discussion in 'PHP' started by mahmood, May 10, 2006.

  1. #1
    I am wondering if this is possible:

    I put a php file - or perhaps another language - on the server and execute it without opening a browser.

    Why do I want such a thing: say I want to make a crawler, the way I know now is to write a php script that follows some urls and read them, this way I have to open my browser and wait until it finishes its job. Now I want to know if I can put a file on the host and let the host server do that for me without me being even connected to the internet.

    I guess if such a thing is possible it would be another languages and not PHP.

    .
     
    mahmood, May 10, 2006 IP
    Will.Spencer likes this.
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    digitalpoint, May 10, 2006 IP
  3. mahmood

    mahmood Guest

    Messages:
    1,228
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Shawn

    I think I am going to need some time to grasp this area.
     
    mahmood, May 10, 2006 IP
  4. goldensea80

    goldensea80 Well-Known Member

    Messages:
    422
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #4
    I am looking for that solution, too. I like something like cron jobs to clean up the things.
     
    goldensea80, May 10, 2006 IP
  5. tech86

    tech86 Peon

    Messages:
    83
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    $ php /path/to/file/php.php

    You can also use this command in cron
     
    tech86, May 11, 2006 IP
  6. goldensea80

    goldensea80 Well-Known Member

    Messages:
    422
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #6
    Yes, but only in case I can use linux shell have have authority to use cron. How can I do using hosting service like godaddy?
     
    goldensea80, May 11, 2006 IP
  7. Selkirk

    Selkirk Peon

    Messages:
    93
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Some hosts allow you to setup cron jobs via a control panel interface. If there is nothing in the control panel and they don't offer shell access, get a better host.
     
    Selkirk, May 11, 2006 IP
  8. sakkaro

    sakkaro Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    if you have CPanel than you can use cron easily or if you have shell access than u can use it.

    cron is a tremendeus function for me :)
     
    sakkaro, May 19, 2006 IP