Here is an example of a script:
--------------------
#!/usr/bin/env python
import thread
import time
import os
import sys
sPHPPath = "/usr/bin/php"
def myphp1():
while 1:
os.system(sPHPPath + " " + sys.path[0] + "/myphp1.php")
time.sleep(2)
def myphp2():
while 1:
os.system(sPHPPath + " " + sys.path[0] + "/myphp2.php")
time.sleep(2)
if __name__=="__main__":
thread.start_new_thread(myphp1, ())
thread.start_new_thread(myphp2, ())
while 1:
time.sleep(60)
No comments:
Post a Comment