469,271 Members | 1,787 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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
Feb 14 '07 #1
3 5113

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

--
HTH,
Rob

Feb 14 '07 #2
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/
Feb 14 '07 #3
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
Feb 14 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Natsu Mizutani | last post: by
2 posts views Thread by Satish Chimakurthi | last post: by
11 posts views Thread by Kamilche | last post: by
3 posts views Thread by Travis Berg | last post: by
1 post views Thread by Stephen Kellett | last post: by
4 posts views Thread by Edwin Gomez | last post: by
10 posts views Thread by Finger.Octopus | last post: by
varuns
reply views Thread by varuns | last post: by
15 posts views Thread by J. Peng | last post: by
16 posts views Thread by Jaco Naude | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.