I want a result of this script is $link=http://yahoo.com but in this if i use $file=$_GET['file']; then it is not working but if i use directly $file="yahoo1"; then i working ok so what will be problem... $type=2; $tlink=1; $aurl="http://yahoo.com|clickhere|yahoo1"; /*and get word is yahoo1*/ if(isset($_GET['file'])) { $file=$_GET['file']; if ($type==2) { $file_url = explode("@", $aurl, $tlink); for($i = 0; $i < count($file_url); $i ++) { $fileurl[$i]= $file_url[$i]; $url = explode("|", $fileurl[$i]); if($url[2]==$file){ $link=$url[0];} } } } echo" $link"; PHP:
I have no idea what you're trying to do with this code, but if it doesn't work with $file=$_GET['file'] and it does work with $file="yahoo1" then I'd say that $_GET['file'] doesn't contain "yahoo1"
No $_GET['file'] contain yahoo1 i checked by $f=$_GET['file'] and then i make echo"$f"; and then it display yahoo1 . actually i m doing it for hide a my download link.