Communicating with a PHP script (and pretending I'm a browser)

Larry Martell larry.martell at gmail.com
Tue Nov 11 16:48:41 CET 2014


I have a PHP app that I want to convert to django. But I want to do it
stages. All the heavy lifting is in the PHP code, so first, I want to
just use templates and views to generate the HTML, but still call the
PHP code. Then later convert the PHP to python.

My issue is that the PHP code expects to get all it's input from the
REQUEST object and I've consumed that in the view. Is there any way I
can somehow supply that to the PHP code?

Is there some way python can communicate like curl ... it needs to
send the request string in the body of a POST request to the URL that
will route to the PHP script and get the output back.



More information about the Python-list mailing list