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

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

ereg_replace()
Basically what i need to do is

$title = "This Suck's"

$striped = ereg_repl

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

Query output more than expected
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_da

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

PHP friend keyword equivalent
is there a PHP equivalent for the C++ friend keyword?

Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the

having probem inserting data into db table
hi

i have a table with following columns in it
Code: candidate_id, degree, cgpa, institute

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

problem in pagination when processing with selectbox form
Hi,

I have a search form, with select boxes, if am selecting the value from the form, it work

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