How do you run a http:// operation in index.php multiple times in the background...

Discussion in 'PHP' started by Blackcastle, Feb 4, 2012.

  1. #1
    Hi,
    In my index.php file I need to run an operation/ open a url i.e http://xxxx.com/xxxxx several times but I want it to run in the background and not display anything or open a browser if possible - just carry out the operation in the background as my computer crashes if I repeat it too many times?

    Also how can I edit the index.php directly from my webpage without having to go into cpanel to edit the url?

    I would very much appreciate your help as my computer keeps crashing.

    Many thanks,
    Blackcastle
     
    Last edited: Feb 4, 2012
    Blackcastle, Feb 4, 2012 IP
  2. lordspace

    lordspace Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    if it's a linux hosting then you can do

    you can try this:

    
    `php some_script.php & 2>&1 > /dev/null`;
    
    Code (markup):
    including the back ticks
     
    lordspace, Feb 4, 2012 IP
  3. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you want the page to load and call the other page asynchronously then you could do so via AJAX.
     
    mallorcahp, Feb 6, 2012 IP