I know PHP include is server sided, but is there something similar I can implement that can work across different servers? Or something server sided that can work on the same server but across different URLs?

Thanks!

Recommended Answers

look into cURL. Note that this is horrible, security-wise.

Jump to Post

All 4 Replies

look into cURL. Note that this is horrible, security-wise.

An include for a URL is possible. the php.ini file has a parm allow_url_include that is normally set to off for security reasons. You should be able to set it on with a local php.ini file (to over-ride the system php.ini file) assuming that your web host hasn't done anything to prevent that. There is also an ini_set command in php that may allow you to enable it from your program (unless somehow blocked by your web host). As mentioned, it does open the door to some security issues so do your research.

Thanks for the info guys, very much appreciated.

The security factor is very important for me and my business, so maybe I should stick to doing things the long way.

Unless I can map a URL to a sub path at another URL?

I did try experimenting with ini_set('allow_url_include','On') but didn't have any success.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.