Multithreading in PHP
Posted
by Jack
on Stack Overflow
See other posts from Stack Overflow
or by Jack
Published on 2010-04-21T04:38:02Z
Indexed on
2010/04/21
4:43 UTC
Read the original article
Hit count: 293
php
I am working on windows. I am building a twitter application which periodically checks for new tweets as well as allows users to update their status. I have written separate PHP files for reading (reader.php) and writing tweets (writer.php). The only problem is how do I periodically read the tweets. There are a few ways which I can think of -
1) Use a time-based job scheduler (like Cron) to periodically run the reader.php. How do I do this?
2) Use multithreading to run both reader and writer.php and use a timer function in reader.php
Suggestions?
© Stack Overflow or respective owner