![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Okay, I'm really stumped on this one. I need a way to prevent a user from using their back button to access pages in a series. Basically someway to check to make sure they didnt use the back button to reach a specific page. I've figured out a way to keep the users from skipping to and fro from pages, so maybe all I need is a way to determine what page they came from, since the pages are in a predictible cycle. Is there anyway to detect this? I know my explination is a little vague, but to get into specifics, but it would take a long to describe everything. Thanks in advance. | |||
| Advertisements |
| | #2 | ||
| > Okay, I'm really stumped on this one. I need a way to prevent a user from > using their back button to access pages in a series. Basically someway to > check to make sure they didnt use the back button to reach a specific page. > I've figured out a way to keep the users from skipping to and fro from > pages, so maybe all I need is a way to determine what page they came from, > since the pages are in a predictible cycle. Is there anyway to detect this? > I know my explination is a little vague, but to get into specifics, but it > would take a long to describe everything. Thanks in advance. I'm not sure about what you want, maybe you can check the referrer and if it isn't the logical previous page then redirect to the next ? But if the browser uses its cache to display the page, php won't help you anyway. _______________________________ SeeSchloss — GPU.sf.net / Nye.free.fr | |||
| | #3 | ||
| "Lee Marsh" <burgermeister01@insightbb.com> schrieb im Newsbeitrag news:EEi1b.168468$cF.59104@rwcrnsc53... > Okay, I'm really stumped on this one. I need a way to prevent a user from > using their back button to access pages in a series. Basically someway to > check to make sure they didnt use the back button to reach a specific page. > I've figured out a way to keep the users from skipping to and fro from > pages, so maybe all I need is a way to determine what page they came from, > since the pages are in a predictible cycle. Is there anyway to detect this? > I know my explination is a little vague, but to get into specifics, but it > would take a long to describe everything. Thanks in advance. > As the back button is controlled by the browser software and not by the webpage it might be best to write "Don't use the back button" on your page. -- Markus | |||
| | #4 | ||
| "Lee Marsh" <burgermeister01@insightbb.com> wrote in news:EEi1b.168468$cF.59104@rwcrnsc53: > Okay, I'm really stumped on this one. I need a way to prevent a user > from using their back button to access pages in a series. Basically > someway to check to make sure they didnt use the back button to reach > a specific page. I've figured out a way to keep the users from > skipping to and fro from pages, so maybe all I need is a way to > determine what page they came from, since the pages are in a > predictible cycle. Is there anyway to detect this? I know my > explination is a little vague, but to get into specifics, but it would > take a long to describe everything. Thanks in advance. There's no way to prevent the browser from using the back button. Use a Session cookie to track what page they're on, and what page is next. -- Larry Flynt for Governor Bringing dignity back to the Governor's Mansion Terry Austin taustin@hyperbooks.com | |||
| | #5 | ||
| That's kind of what I'm doing right now, that's how I prevented users from skipping pages. Anyways, I think I might be able to actually pull it off, if I knew some function or something that told me what the last page the user was at. Isn't there some way to detect that? On a page counter service I used to use, they told you where your visitors were referred from, so I know there must be some way. Anyways, it may all be a moot point, since my ISP found out I was running a server off my computer. They threatened to pull the plug on me if I didn't shut down, so until I can get a web host that supports PHP, no more programming for me = [ | |||
| | #6 | ||
| "Lee Marsh" <burgermeister01@insightbb.com> wrote in news:jkw1b.174906$Oz4.45500@rwcrnsc54: > That's kind of what I'm doing right now, that's how I prevented users > from skipping pages. Anyways, I think I might be able to actually pull > it off, if I knew some function or something that told me what the > last page the user was at. Isn't there some way to detect that? On a > page counter service I used to use, they told you where your visitors > were referred from, so I know there must be some way. The Referrer header is not reliable. It is controlled by the browser. If you're already using PHP to keep people from skipping, it should be easy to keep them from going back. Learn about Sessions. They're basically short term cookies. Set a Session cookie to the last page they viewed, and when the next page is accessed, read that cookie and it tells you what the last page was. > > Anyways, it may all be a moot point, since my ISP found out I was > running a server off my computer. They threatened to pull the plug on > me if I didn't shut down, so until I can get a web host that supports > PHP, no more programming for me = [ The joys of consumer broadband. -- Larry Flynt for Governor Bringing dignity back to the Governor's Mansion Terry Austin taustin@hyperbooks.com | |||
| | #7 | ||
| "Lee Marsh" <burgermeister01@insightbb.com> wrote in message news:EEi1b.168468$cF.59104@rwcrnsc53... > Okay, I'm really stumped on this one. I need a way to prevent a user from > using their back button to access pages in a series. Basically someway to > check to make sure they didnt use the back button to reach a specific page. > I've figured out a way to keep the users from skipping to and fro from > pages, so maybe all I need is a way to determine what page they came from, > since the pages are in a predictible cycle. Is there anyway to detect this? > I know my explination is a little vague, but to get into specifics, but it > would take a long to describe everything. Thanks in advance. > > You can use the header() function to set the page expire at a short time (www.web-caching.com has more info on http headers that get sent to the browser ) this way if the person clicks the back button they get "the page you have requested has expired. that should stop it example code header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache"); | |||
| | #8 | ||
| Hmm, okay, I said screw my ISP and ran my server again just long enough to see how well this works, becuase I like this idea. It's resourceful and it doesn't require me to register any more variables with the session, but there's one problem: I can't seem to get it to work right, and I have no idea why. I put all the header commands in an include file and put it at the very beginning of every page I wanted to protect in this manner. Here is the contents of this file: <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0, false"); header("Pragma: no-cache"); ?> What might be wrong with this picture? | |||
| Featured Websites | ||||
|
![]() |
| Tags: button |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Create Button/Hyperlink | Bob | HTML | 10 | 01-27-2008 8:09 PM |
| Back button | Albert Ahtenberg | PHP | 1 | 07-01-2007 3:13 PM |
| Adobe Photoshop cs3 version 10 - why no back or forward button in case of mistakes ? | henry | Graphics in general | 29 | 06-12-2007 1:40 PM |
| Button | Jim | Graphics in general | 1 | 06-11-2007 7:17 PM |
| Toolbar Refresh Button Help... | David Boothe | Database | 1 | 06-10-2007 12:25 AM |
| Featured Websites | ||||
|