RE: [PHP] redirect to a page the fist time a site is accessed
hey,boy, i think you should use datebase to store user status,use user's internet-ip and intranet-ip to idenification. To: php-general@lists.php.net From: d...@program-it.ca Date: Wed, 15 Apr 2009 16:20:05 -0400 Subject: Re: [PHP] redirect to a page the fist time a site is accessed Andrew Ballard aball...@gmail.com wrote in message news:b6023aa40904150926g3e6fb478s36b18b6a53ec3...@mail.gmail.com... On Tue, Apr 14, 2009 at 10:30 PM, Jason Pruim ja...@jasonpruim.com wrote: On Apr 14, 2009, at 10:11 PM, Don d...@program-it.ca wrote: Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Probably the best way I could think of would be to set a cookie on their computer that you check for when they come and redirect based on that cookie. It's not completely fail proof because all they have to do is clear cookies and they will see it again but it should work for most people. Well, there is that ... and if the browser does not accept your cookie, it will be trapped in an infinte redirection cycle. Andrew Yes and from php.net, Cookies will not become visible until the next loading of a page that the cookie should be visible for. So there's no PHP solution for my problem? I think I need to use unreliable JavaScript. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Windows Live™: Life without walls. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1b_explore_042009
Re: [PHP] redirect to a page the fist time a site is accessed
2009/4/15 Don d...@program-it.ca: I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Why redirect? That sucks as a user experience. Why not simply put an alert somewhere prominent on the page with the message you want to convey? That way you can have it on every page and not interrupt the users use of your site. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
I Agree with @stuart. Regards, Igor Escoar Systems Analyst Interface Designer -- Personal Blog ~ blog.igorescobar.com Online Portifolio ~ www.igorescobar.com Twitter ~ @igorescobar On Thu, Apr 16, 2009 at 6:05 AM, Stuart stut...@gmail.com wrote: 2009/4/15 Don d...@program-it.ca: I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Why redirect? That sucks as a user experience. Why not simply put an alert somewhere prominent on the page with the message you want to convey? That way you can have it on every page and not interrupt the users use of your site. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
Stuart wrote: 2009/4/15 Don d...@program-it.ca: I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Why redirect? That sucks as a user experience. Why not simply put an alert somewhere prominent on the page with the message you want to convey? That way you can have it on every page and not interrupt the users use of your site. I agree, and you can still try the cookie method to not show the message, but it's not a big deal if they don't get the cookie/it expires etc., because the worst thing that can happen is that they see the message. -Stuart -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
On Thu, 16 Apr 2009 09:26:52 -0500, nos...@mckenzies.net (Shawn McKenzie) wrote: Stuart wrote: 2009/4/15 Don d...@program-it.ca: I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Why redirect? That sucks as a user experience. Why not simply put an alert somewhere prominent on the page with the message you want to convey? That way you can have it on every page and not interrupt the users use of your site. I agree, and you can still try the cookie method to not show the message, but it's not a big deal if they don't get the cookie/it expires etc., because the worst thing that can happen is that they see the message. Alternatively add a link 'If you are new/Introduction/etc' that the new user can click to get more information if they want it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
On Tue, Apr 14, 2009 at 10:30 PM, Jason Pruim ja...@jasonpruim.com wrote: On Apr 14, 2009, at 10:11 PM, Don d...@program-it.ca wrote: Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Probably the best way I could think of would be to set a cookie on their computer that you check for when they come and redirect based on that cookie. It's not completely fail proof because all they have to do is clear cookies and they will see it again but it should work for most people. Well, there is that ... and if the browser does not accept your cookie, it will be trapped in an infinte redirection cycle. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
Andrew Ballard aball...@gmail.com wrote in message news:b6023aa40904150926g3e6fb478s36b18b6a53ec3...@mail.gmail.com... On Tue, Apr 14, 2009 at 10:30 PM, Jason Pruim ja...@jasonpruim.com wrote: On Apr 14, 2009, at 10:11 PM, Don d...@program-it.ca wrote: Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Probably the best way I could think of would be to set a cookie on their computer that you check for when they come and redirect based on that cookie. It's not completely fail proof because all they have to do is clear cookies and they will see it again but it should work for most people. Well, there is that ... and if the browser does not accept your cookie, it will be trapped in an infinte redirection cycle. Andrew Yes and from php.net, Cookies will not become visible until the next loading of a page that the cookie should be visible for. So there's no PHP solution for my problem? I think I need to use unreliable JavaScript. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] redirect to a page the fist time a site is accessed
Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
Don wrote: Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? # first time visitor? if (!isset(cookie)) { set cookie redirect exit; } # they've been here before, continue as normal. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect to a page the fist time a site is accessed
On Apr 14, 2009, at 10:11 PM, Don d...@program-it.ca wrote: Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know how to redirect the users but what I want to do is redirect a user ONLY the first time the web site is accessed regardless of what page they first access. I would like to minimize overhead (no database). Can this be done? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Probably the best way I could think of would be to set a cookie on their computer that you check for when they come and redirect based on that cookie. It's not completely fail proof because all they have to do is clear cookies and they will see it again but it should work for most people. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php