Results 1 to 4 of 4

Thread: Need site to change phone #'s dynamically.

  1. #1
    Join Date
    May 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Need site to change phone #'s dynamically.

    Hi all,

    My boss wants our website to change phone #'s when someone visits from yellowpages.com and also various other sites. We'll have 5 or 6 phone numbers, anyone know how to do this? New at the job and want to help out.

    Thanks
    Gabe

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    do you mean,

    you need to give a new number to visitors because your listing on yellowpages.com is wrong?

    or you want to give them a specific number to call based on which site they come from (or some other criteria)?

    I don't quite understand what you want to do.

  3. #3
    Join Date
    May 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    we want to give a specific phone # based on how they came to the site.

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    so if they arrive to the site because they used a search engine (google, yahoo, ask...) you want to give a number but if they have the page bookmarked you want to give a different number, and if they come through yellowpages.com you want to give a third (different) number?

    I would highly suggest against, this, but rather listing all the possible numbers in a section of the site

    I say this because the "referer" or page that was previously visited before coming to the current one can easily be spoofed (tricked) into not being genuine. Also as i stated in my example, someone may come to the site via a search engine, then save it as a bookmark or as their "home page" in which case it wouldn't necessarily be the same referrer type as the original.

    if you would like to go against my suggestion the best way to do this is through a server-side language like PHP, because using a client-side language such as Javascript, could be turned off, in which case you will not know what the referrer is even if it wasn't spoofed.

    PHP Code:
    $_SERVER['HTTP_REFERRER']; 
    will give you the previous page, and which case you can handle what to display from there using some type of validation / looping system.

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
  •