Errr redirect is all i really wanted but i want to mask the url,
but that is too easy for the person accessing the page to guess its location, is it possible to take the variables and check and change them with a text file. I can do it with the following script using one variable:
<?php
//--- default url
$url="http://mypage.com/fil-bin/error.html";
//--- read url data
$buffer=file("http://mypage.com/fil-bin/redir.txt");
//--- convert to array
$data= array();
foreach ( $buffer as $line ){
$data[]=explode(";",$line);
}
$found=false;
$i=0;
while( $i<count($data) and !$found ){
if ( $id== $data[$i][0] ){
$url=$data[$i][1];
$found=true;
}
$i++;
}
?>
<HTML>
<HEAD>
<TITLE>Redirecting, pleas wait!</TITLE>
<META http-equiv="refresh" content="0; URL=<? echo "$url"; ?>">
</HEAD>
<BODY>
</BODY>
</HTML>
so if i typed ..../redir.php?id=100 it would access the file "redit.txt" and change the page to index.html
is it possible to do this using my scrip from the first post so i have multiple text files, eg..
lang.txt (gives the language folder names)
page.txt (changes the id into a page)
so the url would be
.../redir.php?lang=1234&id=98765
and it would convert them in the text file to eg:
.../english/index.html
Sorry about my wording, but its hard to explain
Thanks in advance
Matt