require '/website/cgi-shl/cgi-lib.pl'; print "Content-type: text/html\n\n"; if (&MethGet) { &ShowForm; }else{ &ProcessForm; } sub ShowForm { print <Guestbook Sign-up!!!

Choose a Guestbook Name

Please select a unique alphanumeric name for your guestbook. This name is also referred to as your owner name.

After selecting your guestbook name and submitting this form, you will be asked a few questions about your website, your email address, and a password.

It's important to remember your password so you can view your private guestbook messages. It's also important to use a valid email address so we can send you your password if you forget it, email you your guestbook entries when necessary, etc. We do not send unsolicited email!

Due to the large number of people using our service, you may need to use a rather creative guestbook name. If the first few you try don't work, try, try again :)

Enter a Guestbook Name:
EOL } sub ProcessForm { &ReadParse(*in); $gb=$in{'owner'}; print <New World Famous Guestbook User

Welcome to the World Famous Guestbook Server

Please continue your registration of guestbook name...

$gb

Please fill out the form entirely and accurately to take full advantage of our current and future utilities.
You will not be sent email, and a marching band will not be sent by your house to signal your ability to use our server because registration happens immediately and all the necessary info will be given to you upon submitting this form.

    This Service is free for personal pages.
    The cost for any business-related page is \$50 (a one time fee). At this time we only accept checks made out to Cybersays Inc.. Please send them to the address on our homepage. To help with your business, you will be given \$50 worth of advertising at our current rate of $50 for 10,000 exposures of your banner.
    Where is your homepage? :

    Homepage Title:

    What is your email address so we can send you information and so you can get your guestbook data mailed to you.

    You have chosen as your guestbook name: $gb
    Do not forget your password or you will not be able to delete entries, etc. Also, the password lookup routines are cAsE sEnSiTiVe
    Please choose an alphanumeric password. This will help prevent others from deleting your guestbook entries.

    The following information will populate our database so your homepage is searchable by the following criteria

    • Keywords
    • City
    • State/Reigon
    • Country.
    Proper entries will also be candidates for our featured-sites page (Coming Soon!)
    Your site will automatically be cataloged from the previous steps, so...
    Now, be as specific as possible about what your page has to offer, e.g. :
    Adding the same keyword more than once or using HTML is unnecessary
    Keywords:

    If you have one, you may provide a Banner Ad URL for your site, less than 8K and 400 pixels wide by 40 high. If you don't have one now, you can supply it later. All submissions must be fully qualified URLs, i.e., the must start with "http://" :

    Where are you from:
    City:
    State/Reigon:
    Country:

    After submitting this form, you will be presented with the necessary code for your homepage which you will be able to cut and paste right into your homepage.

    http://lpage.com/
    EOF } sub HTTP_Get { local($URL) = $_[0]; # The first arg is the URL. local($name, $alii, $port2, $type, $len, # We need to define some $local, $remote, $protocol, $temp, # local variables first. $local_addr, $rem_addr, $request); # $port = 80; # Default port is 80. $rem_host = "localhost"; # Default target is 127.0.0.1. chop($local_host = `hostname`); # Determine local FQDN. $URL =~ s/^[\s\n]*(.*)[\s\n]*$/\1/; # Remove surrounding newlines # and whitespace from the URL. if ($URL =~ /^http:\/\/([^\/]*)(.*)$/i) { # The URL must be of the form: $rem_host = $1; # http://rem_host/path $path = $2; # if ($path =~ /^\s*$/) { # (This should even work if $path = "/"; # the path is blank.) } if ($rem_host =~ /^(.*):([0-9]*)$/) { # Perhaps our remote host $rem_host = $1; # includes a port number. $port = $2; # } # } else { # return undef; # } # ($name, $alii, $protocol) = # Retrieve the numeric value getprotobyname('tcp'); # for TCP, used by socket(). ($name, $alii, $type, $len, $local_addr) = # Now retrieve the four-byte gethostbyname($local_host); # addresses of the local and ($name, $alii, $type, $len, $rem_addr) = # remote Internet addresses. gethostbyname($rem_host); # $local = pack("S n a4 x8", # Now pack those addresses 2, 0, $local_addr); # in a socket-call format. $remote = pack("S n a4 x8", # 2, $port, $rem_addr); # socket(S, 2, 1, $protocol) || # Open the socket. return undef; # bind(S, $local) || return undef; # Bind it to the local address. connect(S, $remote) || return undef; # Connect to the remote address. select(S); # This is a fine time to make $| = 1; # sure that the socket sends select(STDOUT); # and receives flushed data. $request = "GET " . $path . # Send the HTTP/1.0 request " HTTP/1.0" . # to the remote web server. "\n\n"; # (Don't forget the blank line.) print S $request; # Send the request on its way. $output = ""; # Now we wait and capture foreach () { # everything that comes back $output .= $_; # down that socket. } $output .= "\r\n\r\n"; # Add two CRLFs for insurance. unless ($output =~ /HTTP/) { # At this point, if we don't return undef; # receive an HTTP-compliant } # response, we bail. $output =~ /^.*HTTP\S* (...)/; # Capture the status code that $statcode = $1; # the remote server generated. if ($statcode =~ /200/) { # If it's 200, we're done. return $output; # } elsif ($statcode =~ /30[12]/) { # If it's a redirect, grab $output =~ /Location: ([^\r\n]*)/; # the returned location, and $newurl = $1; # recursively try again. if ($tempout = &HTTP_Get($newurl)) { # return $tempout; # } else { # return undef; # } # } else { # Otherwise, bail and return return $output; # whatever passes for a server } # response. }