Re: defeating a flash intro page
| From: | Robin Chen | Date: | Mon, 30 Oct 2000 06:44:33 +0000 |
| Subject: | Re: defeating a flash intro page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22619@lists.php.net to get a copy of this message | ||
Either build a "Skip Intro" button to the Flash intro or put a link on
the bottom of the Flash so that users can jump to another page.
Robin
Mark Peoples wrote:
>
> Ok, we're putting up a new site for an existing site, but we've got an intro
> page that has a quick flash movie in it. Within the site, on every page,
> there is a link to the 'root' page (href="/"), which, in our case is
> index.php3 (of course <g>).
>
> The problem is that we don't want visitors to have to go through the flash
> intro every time they come back to / . So, I got to thinking of how to make
> this not happen. Well, it'd be easy with cookies, but not all surfers are
> like Cookie Monster. =) Then, when looking through the online manual for
> something else, I saw a reference to $HTTP_REFERER, and remembered using it
> in the past for something else.
>
> So, my simple solution was:
>
> --index.php3--
> <?php
> if(!(eregi("yourdomain.com", $HTTP_REFERER)))
> {
> //display what you want on your flash page... virtual() would probably be
> even better though
> }
> else
> {
> //display what you'd normally get when you click on 'Skip Intro'
> on your
> flash page
> }
> ?>
>
> The reason I do the !(eregi() is to make it easier to add it to pages you've
> already got. Like...
>
> --index.php3--
> <?php
> if(!(eregi("yourdomain.com", $HTTP_REFERER)))
> {
> //display what you want on your flash page... virtual() would probably be
> even better though
> }
> else
> {
> //display what you'd normally get when you click on 'Skip Intro'
> on your
> flash page
> ?>
> <i>here is some more html</i>
> <p>You see this after you click on 'Skip Intro' or when you link from
> another page somewhere on your site.</p>
> <?php
> }
> ?>
>
> I'm sure someone else can come up with a better regular expression (eg, like
> one to defeat a link from a search from yahoo)...something like (this is
> totally wrong...it ain't PHP, it's *pseudocode*, I'm tired, and, it's 1AM
> <g>):
>
> eregi("http://????.yourdomain.com",
> $HTTP_REFERER)
>
> where ???? could be any valid sequence of characters of various lengths in a
> URL so you could have links from sub-domain.yourdomain.com and
> www.yourdomain.com that would work as intended.
>
> Have fun with it, but test it before you use it in production. =)
>
> marco
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net