Activity Stream
48,167 MEMBERS
6801 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Member

    Default Noob question about PHP Curl

    Hi everyone,
    This is just a noob question.
    I'm wondering if PHP Curl can run asynchronously or run in background?
    I'm developing a script for Wordpress plugin and fire when publish a post.
    When publish a post, it will fire another script with curl.
    But the other script take a very long time to finish, and Wordpress waiting for it.
    So i need some advice from you guys how to run it in background.
    Thanks everyone. I like this forum. KWWH rocks!
    mixmax Reviewed by mixmax on . Noob question about PHP Curl Hi everyone, This is just a noob question. I'm wondering if PHP Curl can run asynchronously or run in background? I'm developing a script for Wordpress plugin and fire when publish a post. When publish a post, it will fire another script with curl. But the other script take a very long time to finish, and Wordpress waiting for it. So i need some advice from you guys how to run it in background. Thanks everyone. I like this forum. KWWH rocks! Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Firstly you should understand that PHP Processor runs on a single thread, soi you can perform task's without taking advantage of other methods.


    The method I would do is pinger.

    within you code you should insert the post into the database and get the ID and do

    PHP Code: 
    $src fopen('some text file','a+');
    fwrite($id,$src);
    fwrite(',',$src);
    fclose($src); 
    So that you can write the id to a directly, then you set up a cron system to run every hour, and the PHP page executed by cron would open up the text file and read the id's and select them from database to be sent elsewhere.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  4.     
    #3
    Member
    Thanks litewarez.
    Finally i manage to get it working.
    I'm using:
    ignore_user_abort(true);
    set_time_limit(0);
    and output buffering.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VPS noob question, Help
    By jasoothai in forum Server Management
    Replies: 19
    Last Post: 10th Jun 2012, 07:19 AM
  2. Noob Question
    By arjaylieann23 in forum Webmasters, Money Making
    Replies: 7
    Last Post: 23rd Aug 2011, 03:20 AM
  3. A noob question
    By praveer in forum General Discussion
    Replies: 16
    Last Post: 23rd Jul 2011, 05:14 PM
  4. A noob question
    By cyano in forum General Discussion
    Replies: 12
    Last Post: 25th Apr 2011, 01:49 PM
  5. Noob question about RDP
    By sefstar2uk in forum General Discussion
    Replies: 2
    Last Post: 13th Oct 2010, 01:24 PM

Tags for this Thread

BE SOCIAL