views:

279

answers:

3

We are using shared hosting and the follow features are disabled. file_uploads = Off allow_url_fopen = Off allow_url_include = Off

We are unable to change hosting and need to figure out some workarounds. The hosting co is also not able/willing to enable these features.

For example: We are calling 1 server from another in order to get content. So we do an include but since URL file include is disabled we are not sure what options we have to get the content on that second server and store it there using some kind of cache.

We control the content server fully (dedicated) so we can do whatever necessary just not sure if there is some easy solution to the problem.

A: 

Since you're looking to retrieve remote content the easiest way will be to write the functionality to fetch the content yourself with something like curl (php.net/curl)

We have been thinking about using curl to grab the content from content server, but how do we cache it to the shared box? Our normal method would be:$artciel=file_get_contents("cache.php?topic
A: 

Have you tried something like this: http://www.humanumbrella.com/2007/12/08/how-to-download-a-remote-file-in-php-and-then-save-it/

Dar
A: 

It depends on how locked down the server is. The given examples (using curl functions or fsockopen) should not be hampered by the restrictions you mentioned.

_Lasar