calling php function from python

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

    #1

    calling php function from python

    is it possible to call a php function from python and use a class from
    php in python? i want to use mmslib which creates mms messages and the
    only implementation is a php mmslib implementation.
    thanks a lot!
    mark
  • Rob Wolfe

    #2
    Re: calling php function from python


    mark wrote:
    is it possible to call a php function from python and use a class from
    php in python? i want to use mmslib which creates mms messages and the
    only implementation is a php mmslib implementation.
    You can consider to use some kind of RPC (remote procedure call)
    for example XML-RPC. This is a platform and language independent
    solution.
    Here you have some information:
    http://www.faqs.org/docs/Linux-HOWTO/XML-RPC-HOWTO.html


    --
    HTH,
    Rob

    Comment

    • Benjamin Niemann

      #3
      Re: calling php function from python

      Rob Wolfe wrote:
      >
      mark wrote:
      >is it possible to call a php function from python and use a class from
      >php in python? i want to use mmslib which creates mms messages and the
      >only implementation is a php mmslib implementation.
      >
      You can consider to use some kind of RPC (remote procedure call)
      for example XML-RPC. This is a platform and language independent
      solution.
      Here you have some information:
      http://www.faqs.org/docs/Linux-HOWTO/XML-RPC-HOWTO.html
      http://groups.google.pl/group/comp.l...6ae6290593fc97
      For a quickstart it's probably easier to run the PHP code using the CGI
      version of the PHP interpreter. E.g.
      os.system('/usr/bin/php mms.php')
      or using the subprocess module, if you want to pass some data to the script
      (using stdin/out).

      As long as no remote PHP server is involved this is easier and perhaps even
      faster than the RPC approach...

      --
      Benjamin Niemann
      Email: pink at odahoda dot de
      WWW: http://pink.odahoda.de/

      Comment

      • Diez B. Roggisch

        #4
        Re: calling php function from python

        mark wrote:
        is it possible to call a php function from python and use a class from
        php in python? i want to use mmslib which creates mms messages and the
        only implementation is a php mmslib implementation.
        Do yourself - and the python community... :) - a favor and just translate
        the mmslib code to python. It is easy and straightforward todo.

        Diez

        Comment

        Working...