http://www.tsu.ru/ http://www.netscape.com/ http://www.microsoft.com/CGI- Perl ( rurl.pl ):
# URL open (FILE, "<LINKS.LST"); # LINKS.LST @url = (<FILE>); # , - close (FILE); srand ( time ); $index = int ( rand ( $#url + 1 ) ); # 0 $#url + 1 print "Location: ", $url[$index], "\n\n"; exit;HTML-:
<a href="/cgi-bin/rurl.pl"> URL</a>
http://www.myhost/pics/img01.gif http://www.myhost/pics/img02.gif http://www.myhost/pics/img03.jpgHTML-:
<img src="/cgi-bin/rurl.pl">! . , . : )
<HTML> <HEAD> <TITLE>My page</TITLE> <SCRIPT Language="JavaScript"> <!-- var Nwindow = null function OpenNW ( url, name, parms ) { Nwindow = window.open( url, name, parms ); } // --> </SCRIPT> </HEAD> <BODY> ...:
<BODY onload="javascript:OpenNW('some.html', 'window_name', 'width=300,height=100')" ... > <a href="javascript:OpenNW('some.html', 'window_name', 'width=300,height=100')">...</a> ..some.html - , URL .
WIDTH HEIGHT parms - [toolbar=yes|no], [location=yes|no], [directories=yes|no], [status=yes|no], [menubar=yes|no], [scrollbars=yes|no], [resizable=yes|no]
<FORM> <SELECT Name="list"> <OPTION Selected Value="file01.html"> #1</OPTION> <OPTION Value="file02.html"> #2</OPTION> <OPTION Value="file03.html"> #3</OPTION> <OPTION Value="file04.html"> #4</OPTION> </SELECT> <INPUT Type=button Value="Go" onClick="window.location.href=this.form.list.options[this.form.list.selectedIndex].value"> </FORM>
open(FILE, "<my_lg.jpg"); print "Content-type: image/jpeg\n\n"; binmode( FILE ); binmode( STDOUT ); while (read(FILE, $data, 4096)) { print $data; } close(FILE);HTML- :
<img src="/cgi-bin/show_img.pl">
open(IFILE, "<$ARGV[0]"); @line = (<IFILE>); close(IFILE); $all_lines = join( "", @line); $all_lines =~ s/<([^>]*)>//g; open(OFILE, ">$ARGV[1]"); print OFILE $all_lines; close(OFILE);CGI- HTML ( Guest Book Message Board)
<SCRIPT LANGUAGE="JavaScript"> <!-- Version = navigator.appVersion.substring(0,1); flag = 0; if (Version > 2) { flag = 1; } function switch_img(imgName, imgURL) { if (flag == 1) { document.images[imgName].src = imgURL; } } // --> </SCRIPT>:
<a href=some.html onMouseOver="switch_img('pic01','box02.gif')" onMouseOut="switch_img('pic01','box01.gif')"> <img name="pic01" src="box01.gif" width=10 height=10 border=0> </a>onMouseOver - , "" .
#!/usr/local/bin/perl # banner.pl $banner[0] = '<a href="http://www.some.site/><img src=benner0.gif width=468 height=60 alt="banner0"></a>"'; $banner[1] = '<a href="http://www.some.site/><img src=benner1.gif width=468 height=60 alt="banner1"></a>"'; $banner[2] = '<a href="http://www.some.site/><img src=benner2.gif width=468 height=60 alt="banner2"></a>"'; $banner[3] = '<a href="http://www.some.site/><img src=benner3.gif width=468 height=60 alt="banner3"></a>"'; $banner[4] = '<a href="http://www.some.site/><img src=benner4.gif width=468 height=60 alt="banner4"></a>"'; srand(time); $index = int(rand($#banner+1)); # content # STDOUT : # print "Content-type: text/html\n\n"; print $banner[$index]; exit;HTML-:
<!--#include "/cgi-bin/banner.pl"--> <!--#include virtual="/cgi-bin/banner.pl"--> <!--#exec cgi="/cgi-bin/banner.pl"-->P.S. .html, .
Last-modified: Fri, 13 Feb 1998 19:29:58 GMT