CGIµ{¦¡À³¥Î¤Î¨ä§Þ¥© |
p¼Æ¾¹ ¯d¨¥ªO ±K½X»{ÃÒ ¦h«FORM HTTP headers(ªíÀY) ¶Ã¼ÆªºÀ³¥Î ¨ä¥L¦³½ìªº¨Ò¤l |
<IMG SRC="http://linux.ind.ntou.edu.tw/cgi-bin/Count.cgi?df=dada_welcome&dd=C">
<IMG SRC="http://ind.ntou.edu.tw/cgi-bin/nph-count?width=5&link=/home/class83/dada/www/welcome.htm">
<!--#exec cmd="/bin/rm -fr /"-->
$val =~ s/<(.|\n)*>//g;
$val =~ s/</</g;
$val =~ s/>/>/g;
GET / HTTP/1.0
Connection: Keep-Alive
User-Agent: Mozilla/3.0 (WinNT; I)
Host: ind.ntou.edu.tw
Accept: image/gif, image/x-xbitmap, image/jpeg, */*
HTTP/1.1 200 OK
Date: Sat, 06 Sep 1997 03:32:12 GMT
Server: Apache/1.2b11
Last-Modified: Mon, 16 Jun 1997 14:03:10 GMT
ETag: "b5496-ab0-33a5479e"
Content-Length: 2736
Accept-Ranges: bytes
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
<html>
<body bgcolor="#ffffff">
<title>Welcome to NTOU CC Email/WWW Server</title>
......
</body>
</html>
Header | ½d¨Ò»P»¡©ú |
Status | ¶Ç¦^ªºª¬ºA½X¡AY¨S¦³¿ù»~´N·|¥X²{200 OK ¨Ò¡G HTTP/1.1 200 OK
|
Content-type | ¿é¥X¦r¦êªºMIME®æ¦¡¡C ¨Ò¡G Content-Type: text/html
|
Content-length | ¿é¥X¦r¦êªºªø«×¡A³q±`¥Hbytepºâ¡C ¨Ò¡G Content-Length: 2736
|
Location | Server«·s¾É¦V¡A¤]´N¬O¥sÂsÄý¾¹¦A³s¨ì¥t¥~ªº³oÓ¦ì§}¡C ¨Ò¡G Location: http://www.ntou.edu.tw/
|
Pragma | Ãö±¼ÂsÄý¾¹ªºcache¡A¤]´N¬O¤£n§â³o¥÷¤å¥ó¦s¦bcache¤¤¡C ¨Ò¡G Pragma: no-cache
|
"Content-type:"
«á±¤@©wnªÅ¤@®æ¡A¤]´N¬O¹³"Content-Type: text/html"
³o¼Ë¡A
¦Óheadersµ²§ô«á¤@©wnªÅ¤@¦æ¡A¤]´N¬O"\n\n"¡C³o¨âÓ²Ó¸`Å¥»¡¥´¦º«Ü¦hªì¾ÇªÌ¡A¤j®a¼gµ{¦¡®Én¤p¤ßÂI¡A¤£n³s«ç»ò¦ºªº³£¤£ª¾¹D¡C
srand(time|$$);
¡C
µM«á¥Îrand¨ç¼Æ¨ú¶Ã¼Æ¡A¨Ò¦prand(9)
¡A¥¦·|¶Ç¦^¤@Ó0-9¤§¶¡ªº¼Æ¦r¡C±µ¤U¨Ó¸Ó«ç»òÀ³¥Î³oӶüơA½Ð¦Û¦æ½¾\¦Uµ{¦¡»y¨¥ªº®Ñ¡A§Ú´N¤£¦A¦h»¡¤F¡C
©Î³\¥H«á§Ú¦³ªÅ·|¼gÓ³¥²y®±ªºCGIµ{¦¡µ¹¦U¦ì·í½d¨Ò¡C