Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Calling PHP

  1. #1
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Added some more informations! Hope u will be able to help me!

  • #3
    New Coder
    Join Date
    Jan 2010
    Posts
    29
    Thanks
    0
    Thanked 2 Times in 2 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •