FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 02-27-1999, 02:16 PM   Postid: 19496
flowersource
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1998
Location: Miami, FL, US
Posts: 185
'Nuther CGI question

Would someone please tell me what to do with the lines that I marked WHAT"S THAT?

$logpath = '/full/path/to/log.txt';
$database = '/full/path/to/db/txt';

$whois_cmd = '/usr/bin/fwhois'; <<WHAT'S THAT?

$timeout = 10;
@referers = ('cgi.tj', 'www.cgi.tj','209.77.224.11');

$header = qq| <<WHAT'S THAT?

$footer = qq| <<WHAT'S THAT?

Thanks,
Mike
flowersource is offline   Reply With Quote
Old 02-27-1999, 04:56 PM   Postid: 19497
 Deb
FutureQuest, Inc.
 
Deb's Avatar
 
Join Date: Jun 1998
Location: Franktown Colorado
Posts: 6,781
W/O seeing the whole thing... I'm guessing... I think it's looking for the url to the "header" of a page it may generate and the "footer" of a page it may generate?

Deb
Deb is offline   Reply With Quote
Old 02-27-1999, 05:04 PM   Postid: 19498
flowersource
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1998
Location: Miami, FL, US
Posts: 185
So you're saying that I don't need to change those two lines, that they will be generated?

'k now, what is this? Is it on the server? Different path?
$whois_cmd = '/usr/bin/fwhois';

Mike

BTW this is the 'configuration' part of a domain name checking script that I want to use on a reseller page. The whole script will fit in a post...wanna see it?



flowersource is offline   Reply With Quote
Old 02-27-1999, 05:45 PM   Postid: 19499
 Deb
FutureQuest, Inc.
 
Deb's Avatar
 
Join Date: Jun 1998
Location: Franktown Colorado
Posts: 6,781
Yes it's on the server.. and your path is correct....

Sure we'll take a peek

Deb
Deb is offline   Reply With Quote
Old 02-27-1999, 05:58 PM   Postid: 19500
flowersource
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1998
Location: Miami, FL, US
Posts: 185
Well, lets paste it and see how it 'prints'.
It came from here www.cgi.tj/scripts/aliendomain.html

#!/usr/bin/perl

# AlienDomain v1.0. Copyright 1998 Jon Hedley. All Rights Reserved.
# Full Docs: http://www.cgi.tj Email: jon@hedley.net
# Do not distribute without express written permission of Jon Hedley.
# Usage is free as long as you link to me: see http://www.cgi.tj/links/
# for the exact details.

# The whois database looks like this (one line per TLD):
# "<tld>|<server>|<available string>|<yes html>|<no html>"

# In the yes & no html (that is returned to the browser depending
# on the availability of the domain), the following strings are
# interpolated:
# [fqdn] - The full domain name searched for (eg cgi.tj)
# [domain] - The domain name searched for (eg cgi)
# [tld] - The top level domain searched (eg tj)

###################################################
# INSTALLATION NOTES #
# #
# 1) Set first line to path of the Perl 5 #
# Interpreter. #
# 2) Set $logpath to the world writable text #
# file to log to. Comment it out to disable #
# logging. #
# 3) Set $database to the world readable text #
# file to use as the whois database. #
# 4) Set $whois_cmd to your server's whois app. #
# It must use the syntax "user@whois.server". #
# 5) Set $timeout to the maximum time to wait #
# for the whois server to return (seconds). #
# 6) Set @referers to the servers that can host #
# forms that call this script. Or comment it #
# out to disable this check. #
# 7) Set $header to the HTML top. Use of tables #
# will mean that the browser will not display #
# until every domain has been searched. #
# 8) Set $footer to the HTML footer. #
###################################################

$logpath = '/full/path/to/log.txt';
$database = '/full/path/to/db/txt';
$whois_cmd = '/usr/bin/fwhois';
$timeout = 10;
@referers = ('cgi.tj', 'www.cgi.tj','209.77.224.11');

$header = qq|
<html><head><title><!-- title --></title></head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h2 align="center"><!-- title --></h2>
|;

$footer = qq|




<h3 align="center"><a href="http://www.cgi.tj/">AlienDomain</a></h2>
<p align="center">Copyright 1997 - 1998 Jon Hedley.

All Rights Reserved.
</body>
</html>
|;

##############################################################
## STOP! That's all you need to edit! Don't break anything! ##
##############################################################
<<<SNIP>>>

Mike
You might want to delete this post...a little on the long side. Sorry

[This message has been edited by flowersource (edited 02-27-99).]

[This message has been edited by Deb (edited 02-28-99).]
flowersource is offline   Reply With Quote
Old 02-27-1999, 06:24 PM   Postid: 19501
hearts
Visitor
 
hearts's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1998
Location: An isolated town in Georgia
Posts: 901
Mikeeeeeee.. this is all ya need to change
@referers --- this info will keep others from using your script. anyways..I am online now if ya want to hit me in email. k?

Quote:
$logpath = '/full/path/to/log.txt';
$database = '/full/path/to/db/txt';
$whois_cmd = '/usr/bin/fwhois';
$timeout = 10;
@referers = ('cgi.tj', 'www.cgi.tj','209.77.224.11');
ooooooooops
there are other variables to..giggle
*sorry*
hit me in email.. and I will give you the changes.. okay? *hugs to ya*

------------------
~~~ hearts ~~~

Heartistic Designs www.heartisticdesigns.com

Hearts www.heartsangels.com/hearts

Heartistic Wishes www.heartsweb.com/heartisticwishes

















[This message has been edited by hearts (edited 02-27-99).]
hearts is offline   Reply With Quote
Old 02-27-1999, 06:33 PM   Postid: 19502
hearts
Visitor
 
hearts's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1998
Location: An isolated town in Georgia
Posts: 901
$header = qq|
<html><head><title> Flowersource </title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h2 align="center"><!-- title --></h2>
|;

$footer = qq|




<h3 align="center"> <a href="http://www.flowersource.net/"> Flowersource </a></h2>
<p align="center"> Copyright 1999 Mikeeeeee.

All Rights Reserved.
</body>
</html>
|;

you can adjust your colors to coordinate your site. *sorry* for rushing earlier.

[This message has been edited by hearts (edited 02-27-99).]
hearts is offline   Reply With Quote
Old 02-27-1999, 06:45 PM   Postid: 19503
flowersource
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1998
Location: Miami, FL, US
Posts: 185
OOOkay,
Guess I give up, I promise to never, ever, look at another .cgi or .pl

Thanks anyway, I'm going hunting for a java script version or do without.

Mike
flowersource is offline   Reply With Quote
Old 02-28-1999, 12:50 AM   Postid: 19504
Del
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 1998
Location: San Bernardino, CA, USA
Posts: 367
Mike,

the 'qq|' thing you were asking about is just a fancy Perl way of doing things When you see something like

$bob = qq|
words, html, whatever, goes here.
|;

it means the exact same as

$bob = "words, html, whatever, goes here.";

The main difference between the two is that in the second one you have to escape any quotes you may want to put in it. With the
qq|
blah blah
|;
thing, you don't have to escape anything.

Now, the way it notices that it's the end (I think, could be mistaken) is when the ending | is the first thing on the line, just like a Perl HERE tag-thing. Also, instead of using a pipe, you can use just about any ascii, non-alphanumeric character. For example;

$bob = qq!
stuff here
!;

is the same as

$bob = qq/
stuff here
/;

and so on and so forth.

Del
Del is offline   Reply With Quote
Old 02-28-1999, 01:28 AM   Postid: 19505
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
So it's very similar to:

print >>HTMLEnd;
<body>
this is my dynamic content
[b]This is bold dynamic crap!
</body>
HTMLEnd

I think...


------------------
Justin Nelson, SFE Software
www.vdj.net

The individual formerly known as SFE Inc.
Justin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:24 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.