Jump to content

Server side forking and optimization


nirrud

Recommended Posts

Hi I am presently writing a code which does the following steps given a site

1) get some keywords (written a function for it)

2) search google for these keywords (I have used curl and getURL functions for these)

3) perform keyword search in the first page of googles results.

 

Presently I have used curl and curl_multi_getcontent but when i run the code it consumes 100% of my server.

My server will not respond in this case if someone else pings.

 

I have been trying to do pcntl_fork, but could you let me know how to optimize this code by threading and forking.

 

I am a newbe in PHP please let me know the structure of how to invoke multiple threads and process the same.

If you have someother suggestions please let me know that too.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/222322-server-side-forking-and-optimization/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.