Just came across this today. It’s rather a fun hack to simulate multi-threaded behaviour with PHP – it certainly solved my problem, but as with most hacks, I find myself grimacing a lot during implementation. It’s very simple: in your webpage generate HTML for any number of images that link to each script you need to run in its own thread, passing whatever info is needed via the query string.

1
2
3
<img height="0" width="0" border="0" src="process.php?whatever=1&something=2" />
<img height="0" width="0" border="0" src="process.php?whatever=3&something=4" />
<img height="0" width="0" border="0" src="process.php?whatever=5&something=6" />

Neat.