FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need help with my dynamic sig.





[FuN]goku
Right ive made a dynamic sig for myself and im proud of it Wink but however, i am having problems with it displaying in forums, as i have to have a ?id=x at the end of the url, but if it didnt require one of those it would display cuz it would be like
http://www.anzerou.sound-hosting.co.uk/sigs/stats.png
instead of
http://www.anzerou.sound-hosting.co.uk/sigs/stats.png/?id=2
so uhm... anyone got any ideas on how to display it with just the stat.png but still display the user by id.
Note : stat.png is a folder not an image.

not including the sql connect info heres what i have

Code:

$result=mysql_query("SELECT `user_posts` FROM `phpbb_users` WHERE `user_id` = '$usr_id'") or die("Error");
$result2=mysql_query("SELECT `username` FROM `phpbb_users` WHERE `user_id` = '$usr_id'") or die("Error");
$result3=mysql_query("SELECT `user_level` FROM `phpbb_users` WHERE `user_id` = '$usr_id'") or die("Error");
$posts = mysql_result($result,'user_posts');
$user = mysql_result($result2,'username');
$rank = mysql_result($result3,'user_level');
//
if($rank == 1){
$rank = "Admin";
}else{
$rank = "User";
}
//

$browser = $_SERVER['HTTP_USER_AGENT'];

if(strstr($browser,"NT 5.1"))
$os = "WindowsXP";

if(strstr($browser,"NT 5.0"))
$os = "Windows2000";

if (strstr($browser, 'Linux'))
$os = "Linux";

if(strstr($browser,"MSIE 5.0"))
$browser = "Internet Explorer";

if(strstr($browser,"MSIE 5.5"))
$browser = "Internet Explorer";

if(strstr($browser,"MSIE 6.0"))
$browser = "Internet Explorer";

if(strstr($browser,"Mozilla/5.0"))
$browser = "Mozilla Firefox";

if(strstr($browser,"Mozilla/4.0"))
$browser = "Mozilla Firefox";

$ip = $_SERVER['REMOTE_ADDR'];
 
$date = gmdate("M d Y");
$time = gmdate("H:i T");

$im    = imagecreatefrompng("sig.png");
$orange = imagecolorallocate($im, 240, 255, 76);
$color = imagecolorallocate($im, 0, 150, 200);
$color2 = imagecolorallocate($im, 255, 255, 255);
$px    = (imagesx($im) - 7.5 * strlen($string)) / 2;
ImageString($im, 3, 11, 5, "Your OS : $os", $orange);
imagestring($im, 3, 11, 20, "Your IP : $ip", $orange);
ImageString($im, 3, 11, 35, "Browser : $browser", $orange);
ImageString($im, 3, 11, 50, "   Time : $time", $orange);
ImageString($im, 3, 11, 65, "   Date : $date", $orange);
ImageString($im, 3, 245, 70, "Stat Sig by [FuN]Goku", $color);

if($usr_id == ""){

}else{

ImageString($im, 3, 235, 5, "  Extreme Coders Forum", $color2);
ImageString($im, 3, 250, 20, "Username : $user", $color);
ImageString($im, 3, 250, 35, "   Posts : $posts", $color);
ImageString($im, 3, 250, 50, "    Rank : $rank", $color);
}


imagepng($im);
imagedestroy($im);
hexkid
[FuN]goku wrote:
i have to have a ?id=x at the end of the url, but if it didnt require one of those it would display


Maybe this works: http://www.anzerou.sound-hosting.co.uk/sigs/stats.png/?id=2&dummy=dummy.png
eepman
You could write a simple mod_rewrite in a .htaccess file and put it in the sigs directory. Then you could access it by typing something like http://www.anzerou.sound-hosting.co.uk/sigs/IDNUMBER.png and it would rewrite it as http://www.anzerou.sound-hosting.co.uk/sigs/stats.png/?id=IDNUMBER

The below might work, but if not sorry:
Code:

RewriteEngine On
RewriteRule ^sigs/([0-9]*).png$ /sigs/stats.png/?id=$1
[FuN]goku
errm no i tried it with the img tags and it dint work hexkid
[FuN]goku
bump -_-
Related topics
Runescape - OFFICIAL THREAD
Dynamic Signatures for Sale!
Get your DYNAMIC SIGS HERE
Need help
www.Dynamic-Sig.com - Dynamic Signature Images
dynamic sig
PHP + GD coder needed - Dynamic Sig Help {SOLVED}
[PHP] Problem with Dynamic Sig's Font Color
Calling all PHP Gods! 200 frih$ to fix my dynamic sig!
Dynamic sig (know the click)
Marine Corp. Sig
Php , Making Dynamic sig
dynamic sig help
help - trouble getting operators to work with fwrite
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.