embedding php generated html output from another site

I’m a programmer, but not much of a PHP coder. I’ve tweaked a PHP library that outputs some info for a client of mine. It works fine. This PHP library requires PHP 5.1 or higher to work. But the site where this output needs to live only supports 4.3 or something like that. Though I asked about it up front, I only learned this now.

I’m hoping that the host can install a current version of PHP for us. The host offers a very simple set of tools, though, so I don’t know yet, what will happen.

In the meantime, let’s say they can’t. Could we host what we’re doing with this library on another server that supports the required version of PHP and import/embed that html output into a page on the existing site? If so, how? Even a pointer to a clear guide would be helpful.

I hope this is clear enough.

Thanks.

Hi maigre,

I may be misunderstanding what you are looking for, but take a look at the html iframe element.

There are a lot of problems with this solution, and it may not work for your particular application. I try to avoid iframes whenever possible, but there are times that they serve a valid and necessary purpose.

You can style an iframe to completely blend into your page, nearly undetectable (visually). HOWEVER, it is a completely foreign entity to the page and anything inside the iframe (forms, etc) are separate and unusable by the page it is embedded in. Even the parent pages css will not apply to the elements in the iframe. It functions the same as a separate browser window that is imbedded into your existing page.

Now, here is the other thing that you and the host should be aware of: PHP 4.3 (I know you said you weren't sure of the version) was released on December 27, 2002. It is 10 years old and [b]should not be used[/b] for any commercial application as far as I am concerned. There is no excuse that I can think of for a host to still be running 4.3 or frankly 4.anything (5 was released in 2004) and I would really push to have them update it.

If you have no other option, I would look at iframes or rewriting the library (if possible). Either way, there have been a substantial number of security enhancements and bug fixes in php since the version you will be using and I would expect the site to be much more vulnerable than it otherwise would!

The last thing I would say is in the event you are forced to stay with an old php version, let me know and I’ll do what I can to help you integrate whatever solution you decide to pursue.

jay

I just rechecked and the PHP version on their server is 4.43 from August, 2006. It IS hard to understand why a webhost would not be more up to date with that. But this seems to be a barebones host. They don’t have cPanel or any parallel. The feature set on the account is the most limited I’ve ever seen.

After speaking with the hosting tech support person, it seems that they can switch us over to a more current version of PHP, well above the minimum I need for this library.

Rewriting the library would have been more work than my client’s budget would have allowed, so that wasn’t an option.

Thanks for the help, malasho. I try to be as generous in knowledge and tone in areas I know well as you were with me here. It’s not always that way, so it’s much appreciated.

Glad to hear they will be switching you over to a more current version! Best of luck to you.

jay

Sponsor our Newsletter | Privacy Policy | Terms of Service