Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > Python

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-06-2011, 10:25 PM   PM User | #1
Am3n0n
New to the CF scene

 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Am3n0n is an unknown quantity at this point
Lightbulb Calling PHP

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 )..

EXAMPLE 2 :


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

Last edited by Am3n0n; 06-07-2011 at 04:36 PM..
Am3n0n is offline   Reply With Quote
Old 06-07-2011, 04:38 PM   PM User | #2
Am3n0n
New to the CF scene

 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Am3n0n is an unknown quantity at this point
Added some more informations! Hope u will be able to help me!
Am3n0n is offline   Reply With Quote
Old 01-12-2012, 07:49 AM   PM User | #3
fatecaresx13
New Coder

 
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 2 Times in 2 Posts
fatecaresx13 is an unknown quantity at this point
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)'

HTH,
Anthony
__________________
Nerd Stuff (code, rrdtool, monitoring, etc):

blog.anthonyhurst.com
fatecaresx13 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:26 AM.


Advertisement
Log in to turn off these ads.