473,385 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Multiple domains and SERVER_NAME

Hi,

If I have multiple domains (mydomain1.com, mydomain2.com,
mydomain3.com) pointing at the same IP, will the call

echo $_SERVER{'SERVER_NAME'];

return the domain name people type into the URL? If not, what is a
PHP call I can make to determine the domain someone typed in?

I'm using PHP 4.4.4. Thanks, - Dave

Mar 22 '07 #1
1 1330
$_SERVER['SERVER_NAME'] should work as well as $_SERVER['HTTP_HOST']

Mar 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mr B | last post by:
Howdy all, I have 2 domain names that both go to the same website. For example, if www.XXXX.com is the primary name for the website, if you type in www.XXXX.com or www.YYYY.com, they both go...
0
by: Fred Palmer | last post by:
Hi all, Can anyone point out some best practices for handling cookies with multiple domains aliases? The problem is that I've got a site with multiple domain aliases and I want them to all...
6
by: Ludvig | last post by:
I have various domains using the same application/assembly They differ in contents and design, based on a "site id", and get its information from an SQL server. Now I have to deploy the...
4
by: Ryan | last post by:
I am developing an application using ASP.NET 2.0. In this application, I need to provide customized database-driven interfaces based on the domain name that the user is accessing the application...
22
by: Brett Romero | last post by:
If my UI app uses three DLLs and two of those DLLs reference something named utilities.dll, does the UI app load utilities.dll twice or does the compiler recognize what is going on and load...
1
by: mindflower | last post by:
Hi, i have a web application running on multiple web domains. I'm looking for the best way to cache data across these multiple domains. The System.Web.Caching.Cache only supports caching over a...
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
6
by: Harshpandya | last post by:
Hi all, I am working on the form in which you fill out the whole PHP form and e mail that details to someone. It is working fine. But now i want to send the same form to be sent to different...
18
by: BDE Consulting | last post by:
I am going crazy. This has been a problem now for over a year and I have yet to figure out what is causing it. I have a single server that is running multiple domains. For this example I will...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.