Print Python output by PHP Code
php, python, scraper
Solution
If i understand it well, your python scraper output to a file and you want to "live" display the output via php. What about doing and loop in php in which you use filemtime to know whether or not the file has been updated? You might add a little sleep in order not to overload your server.
If your are using a web page, you may use AJAX to reload only the concerned part of the page at a regular interval.
Hoping this helps you.
Problem
I have a scraper which scrape one site (Written in python). While scraping the site, that print lines which are about to write in CSV. Scraper has been written in Python and now I want to execute it via PHP code. My question is how can I print each line which is getting printed by python code. I have used exec function but it is none of my use and gives output after executing all the program. So; Is it possible to get python output printed while it is getting executed via PHP.