Hey Gurus, I'm trying to implement Prosper's LP rotator script.
I get the following error (Line 35 btw is the include_once command). Do you know what config changes I need to do to enable "URL file-access"?
Sorry for the retarded question guys, but hope you can hook me up with your knowledge bombs. Thanks!
I get the following error (Line 35 btw is the include_once command). Do you know what config changes I need to do to enable "URL file-access"?
Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/yo/public_html/index.php on line 35
PHP:
<?
//Tracking202 Landing Page Rotation Script
//landing pages filenames, theses will be rotated between eachother
//theses landing pages must be in the same DIRECTORY as this file
//you can add as many landing pages here as you like
$landingpage[1] = 'http://example.com/LP1';
$landingpage[2] = 'http://example.com/LP2';
$landingpage[3] = 'http://example.com/LP3';
//this is the text file, which will be stored in the same directory as this file,
//count.txt needs to be CHMOD to 777, full privlledges, to read and write to it.
$myFile = "count.txt";
//open the txt file
$fh = @fopen($myFile, 'r');
$lpNumber = @fread($fh, 5);
@fclose($fh);
//see which landing page is next in line to be shown.
if ($lpNumber >= count($landingpage)) {
$lpNumber = 1;
} else {
$lpNumber = $lpNumber + 1;
}
//write to the txt file.
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $lpNumber . "\n";
fwrite($fh, $stringData);
fclose($fh);
//include the landing page
include_once($landingpage[$lpNumber]);
//terminate script
die();
?>
Sorry for the retarded question guys, but hope you can hook me up with your knowledge bombs. Thanks!