Loading ...
Sorry, an error occurred while loading the content.

RE: [php_mysql] Retieve the calling domain name in PHP......

Expand Messages
  • Muthukumar Selvarasu
    Hi Try this echo Welcome to the website .$_SERVER[ HTTP_HOST ]; or echo Welcome to the website .$_SERVER[ SERVER_NAME ]; Thanks, Muthukumar Selvarasu,
    Message 1 of 1 , Apr 1, 2008



      Try this


      echo “Welcome to the website”.$_SERVER['HTTP_HOST'];




                      echo “Welcome to the website”.$_SERVER[' SERVER_NAME'];





      Muthukumar Selvarasu,

      Project Manager (Web Development),

      Webmasters Ltd.



      From: php_mysql@yahoogroups.com [mailto:php_mysql@yahoogroups.com] On Behalf Of Hitesh
      Sent: Monday, March 31, 2008 8:26 PM
      To: php-list@yahoogroups.com
      Cc: php-objects@yahoogroups.com; php4india@yahoogroups.com; PHP_MySQL_usergroup@yahoogroups.com; php_mysql@yahoogroups.com; phpug-ph@yahoogroups.com; phpresource@yahoogroups.com; web_page_programming@yahoogroups.com
      Subject: [php_mysql] Retieve the calling domain name in PHP......



      I have 20 Domains with me.

      All the 20 Domains are pointed to a same single directory on my web space
      (Linux), resulting when a user types any URL out of those 20 domain names,
      the person is taken to a same php page.

      Now, that php page has a headline as "Welcome to the website
      www.mywebsite.com" (website name)

      The problem is, I want such a php script code, that would retrieve the
      particular name of the calling domain and then add that domain name in that

      For example I have 4 domains www.123.com, www.abc.com, www.890.com &
      www.xyz.com, that means a person typing the url www.123.com will see a home

      As "Welcome to the website www.123.com", and if he types www.abc.com, then
      the page should be "Welcome to the website www.abc.com", but the php file
      remains only ONE.

      Thank you very much for any feedback or views in this situation....

      [Non-text portions of this message have been removed]

    Your message has been successfully submitted and would be delivered to recipients shortly.