How to do this in PHP?

Discussion in 'PHP' started by riya_senk, May 7, 2008.

  1. #1
    I am uploading file on one file hosting site using cURL, but I want to do that process in background, I mean browser should not be wait untill its uploaded or give reply so how can I do in php?


    I tried to do using wget -b command to do upload process in background but its not uploading all times, Is there any other solution for it?
     
    riya_senk, May 7, 2008 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    you can use a cron job from cpanel of hosting

    For running jobs in background automatically

    Regards

    Alex
     
    kmap, May 7, 2008 IP
  3. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Use this command

    exec("/usr/bin/php /home/public_html/yourfolder/yourfile.php >/dev/null &");


    Change the php path & your script file path as you have....
     
    tamilsoft, May 8, 2008 IP
    riya_senk likes this.
  4. riya_senk

    riya_senk Well-Known Member

    Messages:
    2,014
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Thanks, I think this will work :)
     
    riya_senk, May 8, 2008 IP