Forum Moderators: coopster
e.g. if www.example.com/folder/file.php
www.example2.com/fold/files.php
www.example3.com/der/file3.php
www.example4.com/folders/file.php
called the script at:
www.example5.com/folder/file.php
to find out what information to display? Basically, there are several pages on around 100 sites of mine that have information that needs updating every so often or the template/scripting adjusting. Each time I have to go to each site and make the changes.
If I could have one script and one template in one place and only edit them it would obviously save hours of work. The information is only entered in one database (it is things like contact phone numbers, product codes etc.) but if I need to make changes to the templates/scripting that calls that information I need to do it on every site every time.
(Did I make sense?)
ob_start();
include("[i]URI of Page to Render[/i]");
$xhtml = ob_get_contents();
ob_end_clean();
echo WhateverFilterYouWant($xhtml); I use almost exactly this technique to reformat pages for cellphones.
PHP's include() function [us3.php.net] will render a URI in the default installation.
This means that you can have a script that is:
<?php include("http://www.webmasterworld.com");?> PHP seems to be the only active language with such simple support for this. I can't find it anywhere in other languages, and I've looked, because I have published a site SDK that relied upon this functionality.
This may be turned off by some hosts, as it can be construed as a security issue (although, if you run it like I showed you, it shouldn't be). However, it is on by default in most PHP installations [us3.php.net].
This requires the following two lines in your php.ini file:
allow_url_fopen = On
allow_url_include = On