best way to hide url

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: best way to hide url

Post by jackpf »

You can't hide the location because obviously the browser needs to know where it is to go and download the page.

Can you not use php to decide whether to show the board or not?

Like....

Code: Select all

if($whatever_condition_to_show_the_board)
echo 'board stuff....';
else
echo 'board not available...';
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: best way to hide url

Post by jackpf »

They base64 encode the urls...but then they unencode it to actually get the page contents.

You could make your own page which acts like a link to the chat script or whatever. Just research fopen() and fread(). Oh, and make sure you send the right headers.

Although...I don't really see the point...since the this script might as well be the chat script itself, since all it's doing is relaying the file contents.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: best way to hide url

Post by jackpf »

Well...you could. You could link to the script with script=flash or script=js in the url...and get the corresponding file contents.

For example:

Code: Select all

switch($_GET['script'])
{
case 'flash':
echo file_get_contents('chat_script/flash_file.flv');
break;
//....and so on
}
Post Reply