Lookup domain in directories VS database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Imagine you are hosting 10.000 subdomains.


----
SOLUTION #1:

you create directories like:

a/
b/
...
s/
s/some-subdomain.freehosting.com/ (this includes CONF.php, where you store some basic infos)


Everytime visitor hits the page you do:

@include('t/test-subdomain.freehosting.com/conf.php')

if (!isset($CONF)) die('such a subdomain does not exist');


----
SOLUTION #2:

Everytime visitor hits the page you connect & search in a MySQL table having 10.000 rows with each domain name and a text field (export_var()) that has some parameters you need.


---


What's better?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux