SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    first page of the visitor

    Hi my friends,

    First of all, just let me say that I like you all and I appreciate your help.

    I'm still learning PHP and I'm happy, but I have a general question about something I saw many times on many websites, during my first visit, let me explain.

    1: I open Google, and I search for something
    2: after I get the result, I click on a link, and I get a Full page advertising, that I see for one time only.
    3: I can wait till the advertising finish, or I click on Skip AD to access directly to the page.

    my question about this page, I don't care about advertising, but I like to know and understand how it's working, it's amazing.

    I don't want to bother you, but I like to learn.

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    What it is is a splash page that sets a cookie on your computer. The cookie stores basic information such as date/time and that you have viewed the advert page (if you hadn't viewed the page - you wouldnt have the cookie!)

    On the initial page load a script would check to see if the cookie was there, if it was it wouldnt server the advert but if it wasnt there then you get it.

    So the flow would be:

    user click the google link to sitea.com
    sitea.com runs a check to see if a cookie has been created
    if it doesnt find the cookie it redirects you to the advert and sets a cookie.

    user comes back to sitea.com
    sitea.com checks for cookie and finds it (because you have been here) and doesnt redirect to the advert

    look at
    www.php.net/cookie
    www.php.net/header (for the redirect)

    HTH

    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot spikeZ for your help, I was surprised because this ad appears when I visit any page of the website for the first time, but I understand now, the code will be in the header and the header normally will be included in each page, non ?

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    yep
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •