Sorlo Forum

 找回密碼
 註冊
搜索
熱搜: 活動 交友 discuz
查看: 1773|回復: 0

*#!&*[分享] PHP for mulitple cuties as 個性圖片

[複製鏈接]
匿名  發表於 2003-8-9 02:53:01 |閱讀模式
[這篇文章最後由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
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

小黑屋|手機版|Archiver|Sorlo Forum

GMT-8, 2025-12-16 14:26 , Processed in 0.305290 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回復 返回頂部 返回列表