34 users online (1 members and 33 guests)  


  Results 1 to 6 of 6

Related

  1. PDA recognition script    Forum: Website Scripts Forum
    Replies: 0
  2. Site recognition    Forum: HTML Forum
    Replies: 3
  1. #1
    Braco's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Posts
    3

    Site recognition

    I have two different sites, each with different style sheets. They both link to one specific page. When a user opens the specific page, it should be loaded using the style sheet from the page of which he came!
    In other words, how is it possible for the page to see from which site the user came?
    I have heard that something like <a href”…..”?”TOKEN”>, where TOKEN is the sites ‘code’, should send this TOKEN with the link ????

    Thanks
    \Braco

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Welcome to the forums Braco

    Sounds to me, if you want to serve up a different(yet the same) page depending on where the user came from, you are wanting to "cloak". I have never done this nor taken the time to learn, simply for the fact that Google and I have a wonderful relationship and I do not want to mess that up

    There are reasons to cloak that are fine, sadly most use it to spam the engines. Though sites do cloak for reasons that are not to spam, you are asking google and others to figure out your intentions, not a situation most would want to place themselves in.

    IMO

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  3. #3
    Braco's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Posts
    3
    Cloaking I don't know?!?!

    All I want to do is a few 'if ..then ....' sentences.
    Like this: IF ‘previous page = A’ THEN ‘use A’s style sheet’
    IF ‘previous page = B’ THEN ‘use B’s style sheet’
    And so on…….

    \Braco

    ps. Go Spurs !!

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Slap me, bad day

    If you are looking at the previous page that is fine, if you are looking at the user themselves(user-agent) that is cloaking.

    I will move this to the scripts forum and somebody will help you out I am sure.

    Dave

    ps: ALL the way
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  5. #5
    sonofmidi's Avatar

    Status
    Offline
    Join Date
    Jan 2001
    Location
    NC, USA
    Posts
    75
    You didn't mention which scripting you wanted to use, but here is a PHP scripplet to check for HTTP_REFERER.

    <?php

    if(stristr($HTTP_REFERER,'domain_1.com'))
    {
    echo '<link rel="stylesheet" type="text/css" href="http://my_domain.com/styles/my_css_1.css">';
    }
    elseif(stristr($HTTP_REFERER,'domain_2.com'))
    {
    echo '<link rel="stylesheet" type="text/css" href="http://my_domain.com/styles/my_css_2.css">';
    }
    else
    {
    echo '<link rel="stylesheet" type="text/css" href="http://my_domain.com/styles/my_css_3.css">';
    }

    ?>
    Last edited by sonofmidi; 04-17-2003 at 03:11 PM.

  6. #6
    Braco's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Posts
    3
    I was looking for a JS instead, but thanks anyway ;-)



Tags for this Thread