You are here: Re: Including a .php file from another server? « PHP Programming Language « IT news, forums, messages
Re: Including a .php file from another server?

Posted by hntgzr on 09/25/05 11:24

"Gordon Burditt" <gordonb.2h4eq@burditt.org> wrote in message
news:11jc2fh2a2ovc1@corp.supernews.com...
> >I am trying to include a function in a .php file on a different server
> >from
>>the main .php files.
>
> When you fetch a PHP file from a remote server, that server processes it
> and sends out the OUTPUT (not the PHP code) from the file. I don't
> know how Apache on the server you are trying to fetch from deals
> with .inc files as opposed to .php files.
>
> Here's an idea: why don't you COPY phpfiletocall.inc to the local
> server and use it there?
>

Because the command fsockopen doesn't work on the local server.

>>include_path=http://www.anotherserver.com/foldername;
>>include(http://www.anotherserver.com/foldername/phpfiletocall.inc);
>>
>>The .inc file is php formatted. Variables are passed to it (not via GET
>>or
>>POST though) and returned using return(variablenames, etc);
>
> If you were expecting to *RUN* phpfiletocall.inc on www.anotherserver.com,
> how do you pass variables to it by other than via $_GET or $_POST?
>

I thought the variables would pass to it anyway. I'm not an expert in PHP
and go only by the guidance on php.net! I've not programmed since the late
80's, so I'm a little out of touch, lol!

If I pass the variables in the URL as ?ip=$ip&port=$port would that work?

As an alternative, I could try calling a function written in CGI, but again,
I am stumped as to how to call a CGI function from a PHP file and have the
results returned!

TIA
h

 

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

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