View Full Version : Calling PHP

06-06-2011, 11:25 PM
Hello, I'm newbie, and need some basics :) ..
I wanna call PHP from Python, for example :
After I run the python script, it will run the PHP code automatically from a site(site.com/test.php) (clicking on the button on the PHP page automatically )..


And After I will run the python script ( python script.py :P ) it will automatically write on those boxes something that I wannt, and then it will click on button!

Thank you :)

06-07-2011, 05:38 PM
Added some more informations! Hope u will be able to help me!

01-12-2012, 08:49 AM
Hmm this is an interesting question. If you have access to the backend of this form there is a far easier way to solve this problem I'm sure.

However, if you can't you want to look up how to essentially do http calls from python and you'll need to know a lot about that form. I'd look into urllib the python library.

To learn more about it go to your Unix command line and type 'python'. Once you have a prompt type 'import urllib' and 'dir(urllib)' or 'help(urllib)'. You can call these two functions on any of the levels down too. I.e. 'dir(urllib.somemethod)'