Getting Subdomain Name With PHP?


Posted on 16th Feb 2014 07:03 pm by admin

I want to grab the subdomain name with PHP so I can generate database queries.

for example my subdomain is san-jose.mydomain.com

How would I go about grabbing the subdoman name with PHP? Thanks!

No comments posted yet

Your Answer:

Login to answer
256 Like 46 Dislike
Previous forums Next forums
Other forums

New to mysqli library - Multiple query problem
Greetings,

I am writing a batch program that executes 3 queries on a single page. Using mysql

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

License Issue - service type user
Hi,

I would like to understand the following issue regarding sap license.
I wish to

Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

AutoChoosing a CSS file based on URL
Hey everyone,

I have a site that has multiple URLs and CSS files.

Based on the URL tha

This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the

MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive '

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash