[CPG] 短網址

編輯index.php 加入以下這些
cpg134_user <- 這邊請自行修改

$qq=$HTTP_SERVER_VARS["QUERY_STRING"];
if (!strstr($qq,’=’) and !empty($qq)) {
$qq = eregi_replace ( ‘%20’, ‘ ‘, $qq);
$qq=mysql_escape_string($qq);
$sql = "SELECT user_id from `cpg134_users` WHERE `user_name` = "$qq"";
$result1 = mysql_query($sql);
if (mysql_num_rows($result1)>0) {
 list($uid) = mysql_fetch_array($result1);
 $cat = sprintf("1%04d",$uid);
}
mysql_free_result($result1);
}

 

 

//
// Main code
//

閱讀全文〈[CPG] 短網址〉