Forum Moderators: coopster

Message Too Old, No Replies

Can I execute PHP from external/different server?

         

kendall

7:08 pm on Jan 29, 2004 (gmt 0)

10+ Year Member



Hopefully there are some experts out there that can help with this - I've done a bit of searching here but haven't found an answer yet.

The problem is, the site where I'm hosting a set of html files does not support PHP. I have another host which does support PHP. I need to have my html files located on the server which does not support PHP.

Is there some way I can execute my PHP scripts within a regular HTML file? I've seen references to using Javascript for this but no working examples (and none I could make work).

Unfortunately I can't get PHP on the site where I need it without redirecting my domain (among other things). If there is a way to execute the PHP remotely, that would be the preference..

thanks,

Kendall

isitreal

8:11 pm on Jan 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No, if you can't move your html files, and your server doesn't support php, then you can't run php on those files, since php is a server side scripting language, so the pages have to be run through the php engine to execute the php in them.

The only thing I can think of is to use frames containing the content, and have that content come from another server that does support php, but then you run into the problems with frames, which is another headache to deal with, especially if you get good search engine traffic, every page always has to lift the visitor from the content back into the frame, which is a pain to implement.

mykel79

10:42 pm on Jan 29, 2004 (gmt 0)

10+ Year Member



isitreal is right - you can use frames. I don't know what you are using php for, but if it is simply to show a banner then using an iframe shouldn't be a problem, since you don't want those indexed by a search engine anyway.

kendall

1:58 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



In my case the PHP is generating the entire page. I suppose then I could setup my source page as simply a blank frame referencing the external site.. Nevertheless, you're right - with frames there's a load of other usability issues.

Thanks for the responses (even if it's an answer I didn't want to see.. :( ).

Kendall

mquarles

5:59 pm on Jan 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hate to say it, but...change hosts. Even as recently as a year or two ago I personally considered it acceptable for a host to not include PHP, but nowadays I think it has become too prevalent.

MQ