You are here: Re: PHP 5.2.0 and Python 2.5 « PHP Programming Language « IT news, forums, messages
Re: PHP 5.2.0 and Python 2.5

Posted by Erwin Moller on 02/01/07 13:43

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация