Frame forwarding, show different content based on domain name

Discussion in 'PHP' started by x232, Sep 9, 2008.

  1. #1
    Hi All,

    I will be creating a white label website for car hire dealers. My main website will be called something like: carhire.com, the content on carhire.com will be pulled in from a database.

    Now once that carhire.com is complete i want to be able to frame forward other domains e.g. phillscars.com, so what will happen is someone will go to phillscars.com and the content wil be loaded from carhire.com (the content loaded will be relevant to phillscars.com).

    There are going to be several domain names frame forwarding to carhire.com, each domain name needs to be read by carhire.com and serve the correct content based on the domain name. Also when someone goes to phillscars.com each link on the website needs to point to http://www.phillscars.com/thelink.php

    I am not sure how to achieve the above, if someone could point me in the correct direction or post sample code that would be most helpful.

    thanks
    rg
     
    x232, Sep 9, 2008 IP
  2. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #2
    Well, you can get current request domain from
    $_SERVER['SERVER_NAME']
    PHP:
     
    AsHinE, Sep 10, 2008 IP