I've got a python crawler crawling a few webpages every few minutes. I'm now trying to implement a user interface to be accessed over the web and to display the data obtained by the crawler. I'm going to use php/html for the interface. Anyway, the user interface needs some sort of button which triggers the crawler to crawl a specific website straight away (and not wait for the next crawl iteration).
Now, is there a way of sending data from the php script to the running python script? I was thinking about standard input/output, but could not find a way this can be done (writing from one process to another process stdin). Then I was thinking about using a shared file which php writes into and python reads from. But then I would need some way to let the python script know, that new data has been written to the file and a way to let the php script know when the crawler has finished its task. Another way would be sockets - but then I think, this would be a bit over the top and not as simple as possible.
Do you have any suggestions to keep everything as simple as possible but still allowing me to send data from a php script to a running python process?
Thanks in advance for any ideas!
Edit: I should note, that the crawler saves the obtained data into a sql database, which php can access. So passing data from the python crawler to the php script is no problem. It's the other way round.
Since i don't know too much about how python works just treat this like a wild idea.

Create an XML on your server which is accessible by both of python and PHP
On the PHP side you can insert new nodes to this XML about new urls with a processed=false flag
Python come and see for unprocessed tasks then fetch data and put sources onto your db
After successful fetching, toggle the processed flag
When next time PHP touch this XML, delete nodes with processed=true attributes

Hope it helps you in some way.
Passing Data to a Python Web Crawler from PHP Script