묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
[re] 랜덤하게 글이나 그림을 올리려면
2002.05.12 22:18
제가 전에 쓰던거였는데..
님께서 필요한건지 모르겠네요..
우선 전 time() 함수를 이용해서 1일이면 01, 2일이면 02, 날짜에 맞게 그에 해당하는 그림파일이나
기타 다른것들을 출력해서 사용했습니다..
예로 명언을 입력하려면 변수 url 에 명언 문자열을 넣어주면 되겠네요..^^
답변이 됬을려나? ^^
//스투 연재 만화 뚜띠
<?
$no = date("d", time());
if($no == '01') {
$url = 'http://www.stoo.com/online_image/2001/0903/20010903dodi_1.jpg';
} else if($no == '02') {
$url = 'http://www.stoo.com/online_image/2001/0902/20010902dodi_1.jpg';
} else if($no == '03') {
$url = 'http://www.stoo.com/online_image/2001/0831/20010831dodi_1.jpg';
} else if($no == "04") {
$url = '+ '+ 'http://www.stoo.com/online_image/2001/0830/20010830dodi_1.jpg';
} else if($no == "05") {
$url = 'http://www.stoo.com/online_image/2001/0829/20010829dodi_1.jpg';
} else if($no == "06") {
$url = 'http://www.stoo.com/online_image/2001/0828/20010828dodi_1.jpg';
} else if($no == "07") {
$url = 'http://www.stoo.com/online_image/2001/0827/20010827dodi_1.jpg';
} else if($no == "08") {
$url = 'http://www.stoo.com/online_image/2001/0826/20010826dodi_1.jpg';
} else if($no == "09") {
$url = 'http://www.stoo.com/online_image/2001/0824/20010824dodi_1.jpg';
} else if($no == "10") {
$url = 'http://www.stoo.com/online_image/2001/0823/20010823dodi_1.jpg';
} else if($no == "11") {
$url = 'http://www.stoo.com/online_image/2001/0822/20010822dodi_1.jpg';
} else if($no == "12") {
$url = 'http://www.stoo.com/online_image/2001/0821/20010821dodi_1.jpg';
} else if($no == "13") {
$url = 'http://www.stoo.com/online_image/2001/0820/20010820dodi_1.jpg';
} else if($no == "14") {
$url = 'http://www.stoo.com/online_image/2001/0819/20010819dodi_1.jpg';
} else if($no == "15") {
$url = 'http://www.stoo.com/online_image/2001/0817/20010817dodi_1.jpg';
} else if($no == "16") {
$url = '+ 'http://www.stoo.com/online_image/2001/0618/20010618dodi.jpg';
} else if($no == "17") {
$url = 'http://www.stoo.com/online_image/2001/0619/20010619dodi.jpg';
} else if($no == "18") {
$url = 'http://www.stoo.com/online_image/2001/0620/20010620dodi.jpg';
} else if($no == "19") {
$url = 'http://www.stoo.com/online_image/2001/0621/20010621dodi.jpg';
} else if($no == "20") {
$url = 'http://www.stoo.com/online_image/2001/0622/20010622dodi.jpg';
} else if($no == "21") {
$url = 'http://www.stoo.com/online_image/2001/0624/20010624dodi.jpg';
} else if($no == "22") {
$url = 'http://www.stoo.com/online_image/2001/0625/20010625dodi.jpg';
} else if($no == "23") {
$url = 'http://www.stoo.com/online_image/2001/0521/20010521dodi.jpg';
} else if($no == "24") {
$url = 'http://www.stoo.com/online_image/2001/0522/20010522dodi.jpg';
} else if($no == "25") {
$url = 'http://www.stoo.com/online_image/2001/0524/20010524dodi.jpg';
} else if($no == "26") {
$url = 'http://www.stoo.com/online_image/2001/0529/20010529dodi.jpg';
} else if($no == "27") {
$url = 'http://www.stoo.com/online_image/2001/0530/20010530dodi.jpg';
} else if($no == "28") {
$url = 'http://www.stoo.com/online_image/2001/0502/20010502dodi.jpg';
} else if($no == "29") {
$url = 'http://www.stoo.com/online_image/2001/0506/20010506dodi.jpg';
} else if($no == "30") {
$url = 'http://www.stoo.com/online_image/2001/0508/20010508dodi.jpg';
} else {
$url = 'http://www.stoo.com/online_image/2001/0509/20010509dodi.jpg';
}
?>
<A href='<?echo("$url")?>' target="_blank" border='0'> 만화 보기</A>
님께서 필요한건지 모르겠네요..
우선 전 time() 함수를 이용해서 1일이면 01, 2일이면 02, 날짜에 맞게 그에 해당하는 그림파일이나
기타 다른것들을 출력해서 사용했습니다..
예로 명언을 입력하려면 변수 url 에 명언 문자열을 넣어주면 되겠네요..^^
답변이 됬을려나? ^^
//스투 연재 만화 뚜띠
<?
$no = date("d", time());
if($no == '01') {
$url = 'http://www.stoo.com/online_image/2001/0903/20010903dodi_1.jpg';
} else if($no == '02') {
$url = 'http://www.stoo.com/online_image/2001/0902/20010902dodi_1.jpg';
} else if($no == '03') {
$url = 'http://www.stoo.com/online_image/2001/0831/20010831dodi_1.jpg';
} else if($no == "04") {
$url = '+ '+ 'http://www.stoo.com/online_image/2001/0830/20010830dodi_1.jpg';
} else if($no == "05") {
$url = 'http://www.stoo.com/online_image/2001/0829/20010829dodi_1.jpg';
} else if($no == "06") {
$url = 'http://www.stoo.com/online_image/2001/0828/20010828dodi_1.jpg';
} else if($no == "07") {
$url = 'http://www.stoo.com/online_image/2001/0827/20010827dodi_1.jpg';
} else if($no == "08") {
$url = 'http://www.stoo.com/online_image/2001/0826/20010826dodi_1.jpg';
} else if($no == "09") {
$url = 'http://www.stoo.com/online_image/2001/0824/20010824dodi_1.jpg';
} else if($no == "10") {
$url = 'http://www.stoo.com/online_image/2001/0823/20010823dodi_1.jpg';
} else if($no == "11") {
$url = 'http://www.stoo.com/online_image/2001/0822/20010822dodi_1.jpg';
} else if($no == "12") {
$url = 'http://www.stoo.com/online_image/2001/0821/20010821dodi_1.jpg';
} else if($no == "13") {
$url = 'http://www.stoo.com/online_image/2001/0820/20010820dodi_1.jpg';
} else if($no == "14") {
$url = 'http://www.stoo.com/online_image/2001/0819/20010819dodi_1.jpg';
} else if($no == "15") {
$url = 'http://www.stoo.com/online_image/2001/0817/20010817dodi_1.jpg';
} else if($no == "16") {
$url = '+ 'http://www.stoo.com/online_image/2001/0618/20010618dodi.jpg';
} else if($no == "17") {
$url = 'http://www.stoo.com/online_image/2001/0619/20010619dodi.jpg';
} else if($no == "18") {
$url = 'http://www.stoo.com/online_image/2001/0620/20010620dodi.jpg';
} else if($no == "19") {
$url = 'http://www.stoo.com/online_image/2001/0621/20010621dodi.jpg';
} else if($no == "20") {
$url = 'http://www.stoo.com/online_image/2001/0622/20010622dodi.jpg';
} else if($no == "21") {
$url = 'http://www.stoo.com/online_image/2001/0624/20010624dodi.jpg';
} else if($no == "22") {
$url = 'http://www.stoo.com/online_image/2001/0625/20010625dodi.jpg';
} else if($no == "23") {
$url = 'http://www.stoo.com/online_image/2001/0521/20010521dodi.jpg';
} else if($no == "24") {
$url = 'http://www.stoo.com/online_image/2001/0522/20010522dodi.jpg';
} else if($no == "25") {
$url = 'http://www.stoo.com/online_image/2001/0524/20010524dodi.jpg';
} else if($no == "26") {
$url = 'http://www.stoo.com/online_image/2001/0529/20010529dodi.jpg';
} else if($no == "27") {
$url = 'http://www.stoo.com/online_image/2001/0530/20010530dodi.jpg';
} else if($no == "28") {
$url = 'http://www.stoo.com/online_image/2001/0502/20010502dodi.jpg';
} else if($no == "29") {
$url = 'http://www.stoo.com/online_image/2001/0506/20010506dodi.jpg';
} else if($no == "30") {
$url = 'http://www.stoo.com/online_image/2001/0508/20010508dodi.jpg';
} else {
$url = 'http://www.stoo.com/online_image/2001/0509/20010509dodi.jpg';
}
?>
<A href='<?echo("$url")?>' target="_blank" border='0'> 만화 보기</A>