ok, i have a question !
is possible like every user from my cpgallery to have a subdomain? ex user1.sitename.com user2.sitename.com ?
i saw something for 4images that worked.... but i like more cpg... so i wanna know if here works to.
this is the code
<?
// Settings
///////////////////////////////////////////
$url = "http://user.com/folder";
$table = "4images_users"; //do not edit if you have not changed table prefix
// Code
///////////////////////////////////////////
include "config.php";
$a_url = $_SERVER["REQUEST_URI"];
$i = explode("/", $a_url);
$b = count($i);
$b = $b-1;
$i = str_replace(array("%20"), " ", $i[$b]);
if (($i != "") and ($i != "guest"))
{
$db = mysql_connect("$db_host", "$db_user", "$db_password") or die ("Error");
@mysql_select_db("$db_name", $db) or die ("DB not found");
$result = mysql_query("SELECT user_id FROM `$table` WHERE user_name='$i'");
$row = mysql_fetch_array($result);
$id = $row['user_id'];
header("Location: ".$url."/member.php?action=showprofile&user_id=".$id."");
}
else
{
header("Location: ".$url."");
}
?>
with this httacces ErrorDocument 404 /who.php
... is there any possible way to do something like that for cpg??