Jump to content

Referring page?


acctman

Recommended Posts

Use the session suggestion.

 

All of the common web proxy scripts set 'HTTP_REFERER' to be the same as the url being requested, so any request to your page through a proxy will look like it is from someone already on your site. There is no guarantee that 'HTTP_REFERER' will contain anything or that it will accurately show that someone reached one of your pages from another one.

Link to comment
https://forums.phpfreaks.com/topic/90741-referring-page/#findComment-465239
Share on other sites

Use the session suggestion.

 

All of the common web proxy scripts set 'HTTP_REFERER' to be the same as the url being requested, so any request to your page through a proxy will look like it is from someone already on your site. There is no guarantee that 'HTTP_REFERER' will contain anything or that it will accurately show that someone reached one of your pages from another one.

 

is there an example of how the set session method should be coded.

Link to comment
https://forums.phpfreaks.com/topic/90741-referring-page/#findComment-465336
Share on other sites

If you knew that much, it wouldn't take but a search on Sessions to see how to use it.

 

In start.php set a session, in upload.php read if that session is set, if not, redirect them away.

 

uhh that didnt help much... i know that much. was asking for an example code.

Link to comment
https://forums.phpfreaks.com/topic/90741-referring-page/#findComment-465987
Share on other sites

hmm i put the following below in the reg_gender.php page (1st page)

 


<?php

session_start();
$_SESSION['location'] = __FILE__;

?>

 

and then in the image imgupload.php page (2nd page) i put the following below.

 

<?php

session_start();
if($_SESSION['location']){
  echo $_SESSION['location'];
}

?>

 

but i was still able to access the imgupload.php page but typing in the URL and not having to go to the reg_gender.php page first.

Link to comment
https://forums.phpfreaks.com/topic/90741-referring-page/#findComment-466597
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.