Ayuda con register_globals en apache...

Danger
14 de Agosto del 2004
tengo este script y funciona perfectamente en mi server en internet, pero lo quiero hacer funcionar en apache con register_globals, es un script donde se pueden agregar enlaces, por favor si alguien me puede ayudar, :(

este es el codigo, solo es una pagina de code:
´´<?
$maxlinks = 10; // The maximum number of links you want displayed

$maxchars = 15; // Set how many characters will be displayed in the link title.
// This will keep the links from getting too long and messing
// up your HTML. It works in both the form chars allowed and
// the max display in case some lame hacker tries from another
// input form.

$maxform = 7; // Set how wide your form fields will be. Again this will help
// the script fit better in your page.

$file = 'slink.dat'; // The name of the file you're using to store the links

$temp = 'tempfile.dat'; // The name of the temp file

$banned_url = array();
$banned_url[] = 'http://www.pornsite1.com/whatever.html'; // List your banned sites here.
$banned_url[] = 'http://www.pornsite2.com/?id=greedyguy'; // YES, it must match exaclty.
$banned_url[] = 'http://www.pornsite3.com/paysite';
$banned_url[] = 'http://www.pornsite4.com/popup.php';


// END Configuration ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
// DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING! //
// Contact me at [email protected] if you need help. //////////////////
////////////////////////////////////////////////////////////////////////////


if (in_array("$url", $banned_url)) { echo "Banned Link<br>"; } else {

if ($name == "") $name = "no title";

if ($submit) {
$url .= ",$namen";
$sp = fopen($temp, "w");
if (flock($sp, 2)) {
$rfile = file($file);
if ($url <> $rfile[0]) {
if (count($rfile) == $maxlinks)
array_pop($rfile);
array_unshift($rfile, $url);
$r = join("", $rfile);
$rp = fopen($file, "w");
$status = fwrite($rp, $r);
$status = fclose($rp);
}
}
$status = fclose($sp);
}
}
$arr = file($file);

foreach ($arr as $r) {
$link = explode(',', $r);
$link[1] = str_replace("\'", "'", $link[1]);

$link[1] = chop($link[1]);
$t = substr($link[1], 0, $maxchars). "";



echo "<a href='$link[0]' target='_blank'>$t</a><br />"; // Format how the link is displayed.
}


?>
<!-- Display the Form for input -->

<form method="post" action="<?php echo $PHP_SELF ?>">
<small>

Link Title:<br><input type="Text" name="name" maxlength="<?php echo "$maxchars"; ?>" size="<?php echo "$maxform"; ?>"><br><br>

Website URL:<br><input type="Text" name="url" size="<?php echo "$maxform"; ?>" value="http://"><br><br>


</small>

<input type="Submit" name="submit" size="7" value="Enter">

</form>

<?php
// Please leave this intact. I worked very hard on this script and all I ask is credit for creating the code and the idea.
echo "<font size="1"><a href="http://www.georgeboone.com" target="_blank">snaplink v1.0</a></font>";
?>´´