Jump to content
Sign in to follow this  
jesseclane

Php Header()

Recommended Posts

salam.. nk tanye pasai header()...

aku nye GET: index.php?dir=&file=

script aku..

CODE
<?php

$ref = $_SERVER['HTTP_REFERER'];
$agent = $_SERVER['HTTP_USER_AGENT'];

if (preg_match("/website.com/i", $ref)) {
$loc = $_GET('dir'); <-- line 8
$file = $_GET('file');
if (!$loc) { die("No input specified"); }
$struct = "?dir=".$loc."&file=".$file;
$sx = "Location: http://site.com/get.php".$struct;
header($sx);
}
else {
echo "Client Information: <br />";
echo "Referrer: ".$ref;
echo "<br />";
echo "User-Agent: ".$agent;
echo "<br />";
echo "BLOCKED";

}
?>


kekadang dir= return "" (xde value); cth> index.php?dir=&file=name.mp3
kalu ada value = index.php?dir=/mp3&file=/name.mp3

Error -->
Fatal error: Function name must be a string in /public_html/index.php on line 8

cmne ek? thx..

script ni aku buat utk disallow website yang curik link aku.. huhu

Share this post


Link to post
Share on other sites
CODE
$loc = $_GET('dir'); <-- line 8
$file = $_GET('file');


bkn sepatutnya mcm ni ker

CODE
$loc = $_GET['dir']; <-- line 8
$file = $_GET['file'];
Edited by slier

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...