PHP 5.2.0 and Python 2.5

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shortash

    PHP 5.2.0 and Python 2.5

    Hi Guys,

    I need some wisdom from you. Is it possible to have PHP pages posting
    to python scripts on the server side and returning values back to the
    calling PHP files? Like, if my enterval.php form's action=" think.py",
    would the two scripts be able to talk to each other?

    Thanks and Best Regards,

    "Shortash"

  • Erwin Moller

    #2
    Re: PHP 5.2.0 and Python 2.5

    Shortash wrote:
    Hi Guys,
    >
    I need some wisdom from you. Is it possible to have PHP pages posting
    to python scripts on the server side and returning values back to the
    calling PHP files? Like, if my enterval.php form's action=" think.py",
    would the two scripts be able to talk to each other?
    >
    Thanks and Best Regards,
    >
    "Shortash"
    Hi,

    I don't know about Phyton (it is on my shortlist of languages I want to
    learn), but from PHP you can call Phyton with CURL.
    That is: if you mean a real POST (HTTP) to a webserver, that happens to be
    running Phyton.
    CURL is able to catch the output produced by that script, so you have 2-way
    communication.

    If you want to call Phyton from commandline, have a look at the exec()
    functions and its nephews.

    Both can be found at www.php.net.

    And more: What I heard of Phyton, it is glued to whatever you can think of,
    so maybe another way of PHP <-Phyton communication exists. But I don't
    now anything about that. :-)

    Regards,
    Erwin Moller

    Comment

    • Shortash

      #3
      Re: PHP 5.2.0 and Python 2.5

      Thanks Erwin, i will investigate the option you mentioned.

      Regards,

      "Shortash"


      On Feb 1, 3:43 pm, Erwin Moller
      <since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
      Shortash wrote:
      Hi Guys,
      >
      I need some wisdom from you. Is it possible to have PHP pages posting
      to python scripts on the server side and returning values back to the
      calling PHP files? Like, if my enterval.php form's action=" think.py",
      would the two scripts be able to talk to each other?
      >
      Thanks and Best Regards,
      >
      "Shortash"
      >
      Hi,
      >
      I don't know about Phyton (it is on my shortlist of languages I want to
      learn), but from PHP you can call Phyton with CURL.
      That is: if you mean a real POST (HTTP) to a webserver, that happens to be
      running Phyton.
      CURL is able to catch the output produced by that script, so you have 2-way
      communication.
      >
      If you want to call Phyton from commandline, have a look at the exec()
      functions and its nephews.
      >
      Both can be found atwww.php.net.
      >
      And more: What I heard of Phyton, it is glued to whatever you can think of,
      so maybe another way of PHP <-Phyton communication exists. But I don't
      now anything about that. :-)
      >
      Regards,
      Erwin Moller

      Comment

      • Toby A Inkster

        #4
        Re: PHP 5.2.0 and Python 2.5

        Shortash wrote:
        I need some wisdom from you. Is it possible to have PHP pages posting
        to python scripts on the server side and returning values back to the
        calling PHP files?
        Also take a look at:


        --
        Toby A Inkster BSc (Hons) ARCS
        Contact Me ~ http://tobyinkster.co.uk/contact
        Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

        * = I'm getting there!

        Comment

        • Shortash

          #5
          Re: PHP 5.2.0 and Python 2.5

          Thanks Toby, will keep you all updated on my blunders :-)

          "Shortash"

          On Feb 2, 11:51 am, Toby A Inkster <usenet200...@t obyinkster.co.u k>
          wrote:
          Shortash wrote:
          I need some wisdom from you. Is it possible to have PHP pages posting
          to python scripts on the server side and returning values back to the
          calling PHP files?
          >
          Also take a look at:http://uk.php.net/manual/en/function.virtual.php
          >
          --
          Toby A Inkster BSc (Hons) ARCS
          Contact Me ~http://tobyinkster.co.uk/contact
          Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux
          >
          * = I'm getting there!

          Comment

          Working...