[這篇文章最後由matfz在 2003/08/09 03:56am 第 4 次編輯]
<_? //<--- stupid_BBS cannot display the right thing
////// You either load the 個性圖片 as in the front page, or 個性圖片 + 簽名 as in a post
////// for test = 0, 個性圖片 only
///// for test = 1, 個性圖片 + 簽名, read a small file to sync 2 pic
//// filename is IMAGE_PREFIX+1 for 個性圖片, IMAGE_PREFIX+2 for 簽名
$image_prefix= array("M","R","S");
if ($test ==0) {
//個性圖片
$the_random = rand(0,2); //random number for pick one from image_prefix
/// write temp file
$themark = fopen ("icon.txt", "w+");
fwrite($themark, "$the_ran");
fclose ($themark);
$result = "$image_prefix[$the_random]1.gif"; ///load pic into php
$the_file = fopen ("$result", "r");
$content = fread ($the_file,filesize("$result"));
echo $content ; //display pic
}
if ($test ==1) {
//簽名
//make sure 個性圖片 part write the temp file first, so u can read the file for sync
usleep(2500000);
$the_mark2 = fopen ("icon.txt", "r"); //read temp file
$the_random= fread($the_mark2, 1);
fclose ($the_mark2);
$result2 = "$image_prefix[$the_random]2.jpg"; ///load pic into php
$the_file2 = fopen ("$result2", "r");
$content2 = fread ($the_file2,filesize("$result2")); //display pic
echo $content2 ;
}
?> cool stuff, right? :em17:
plug these into your profile
個性圖片
http://www.your-own-fuckin-website.com/whatever_filename_you_named.php?test=1&fakethesystem=fake_format_type._gif
簽名
http://www.your-own-fuckin-website.com/whatever_filename_you_named.php?test=0
should work |