Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

How to prevent direct linking?

Status
Not open for further replies.

Whois-Search

Level 9
Legacy Platinum Member
Joined
Apr 28, 2002
Messages
3,119
Reaction score
1
Have a login link on the front page which is a pop up password box
 

insomnia

DNF Regular
Legacy Exclusive Member
Joined
Jun 13, 2002
Messages
869
Reaction score
0
Just put the login on the main page?
 

bidawinner

Level 9
Legacy Exclusive Member
Joined
Jul 12, 2002
Messages
3,571
Reaction score
0

Lats

Level 5
Legacy Platinum Member
Joined
Jun 6, 2002
Messages
299
Reaction score
0
Put this on the chessgame/index.php page...
Code:
<?php 

if ($HTTP_REFERER != "http://www.chessmasters.us/chessgame/index.php")

header("Location: [url]http://www.chessmasters.us/chessgame/index.php[/url]");

// echo $HTTP_REFERER;
// echo "redirecting...";

?>

<html>
<head>
<title>Play Chess</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>Redirection Testing:</p>
</body>
</html>
 

bidawinner

Level 9
Legacy Exclusive Member
Joined
Jul 12, 2002
Messages
3,571
Reaction score
0
Originally posted by SicChild
check the HTTP_REFERER using php.
Thakns sirchild..but I'm not that technicaly savy.. not quite sure what that means..

I'll do a search and see if I cant figure it out though..apprciate the help..
 

bidawinner

Level 9
Legacy Exclusive Member
Joined
Jul 12, 2002
Messages
3,571
Reaction score
0
Lats to the rescue..some kind of G angel ? lol..

So thisis the http_referer Sirchild was talking about..

Thahkis Guy's I'l give it a try and also do a google search on http_REFERER code so I understand it..


I'll let you know how it goes...

Originally posted by Lats
Put this on the chessgame/index.php page...
Code:
<?php 

if ($HTTP_REFERER != "http://www.chessmasters.us/chessgame/index.php")

header("Location: [url]http://www.chessmasters.us/chessgame/index.php[/url]");

// echo $HTTP_REFERER;
// echo "redirecting...";

?>

<html>
<head>
<title>Play Chess</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>Redirection Testing:</p>
</body>
</html>
 

SicChild

Level 1
Legacy Gold Member
Joined
Aug 16, 2002
Messages
9
Reaction score
0
well here's my version of the code:
Code:
<?php
if(!strstr($_SERVER['HTTP_REFERER'],"chessmasters.us")) {
          header("Location: [url]http://www.chessmasters.us[/url]");
}
?>
Just put that at the top of your /chessgame/index.php page. HTTP_REFERER means 'the page that the client was at before reaching the desitation page. So what that code does it check if the last page visited by the client contained "chessmasters.us" in the URL, and if not, it redirects them to your homepage. Try it out.
 

bidawinner

Level 9
Legacy Exclusive Member
Joined
Jul 12, 2002
Messages
3,571
Reaction score
0
Couldnt get either one to work..
got this error on your lats..

Warning: Cannot modify header information - headers already sent by (output started at /home/chessmas/public_html/chessgame/index.php:18) in /home/chessmas/public_html/chessgame/index.php on line 32

I havent a clue what I am doing ..BUT..I did fiqure out something that I didnt know before..

Lats remember when you installed this script for me..I dont have any of those php files locally ..all on my server..

But when I went to add that http-refercode..

Iwent to this page
http://www.chessmasters.us/chessgame/index.php
and then simply used my front page import and only then did I realze that I could edit those type php page's just like any html page.. I thought all PHP pages were generated at the server end and I didnt have control..

I know it's just child's play to you guy's ...but to me it was a litlle discovery..

anyways , the entire problem was that if all the players skip right to this blank sign in page no way will I ever get any revenues fromselling chess sets, posters etc.. ..

Now that I understand I can edit these pages just like any other page I can simply start adding affiliate stuff on these pages.. "duh" .. and I dont need to force them to go to the home page first..

although it would be nice to understand what I am doing wrong with the http:refer thingy ..

Thanks Guys..
 

Lats

Level 5
Legacy Platinum Member
Joined
Jun 6, 2002
Messages
299
Reaction score
0
That error comes up because you have something else before the header information - take a close look, it might even be a space.

I'd recommend downloading those files to your local drive via FTP - you can then edit 'properly' in a text editor.
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 1) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Premium Members

Upcoming events

Latest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom