Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wild cards?

Status
Not open for further replies.

LordyLordy

Technical User
Oct 15, 2001
11
GB
Hi,

I'm using a form mail script to send a mail off from an asp page.

I have a html form on the asp page with 3 fields which use vb script to automatically insert information from the previour page using the URL line .asp?fullname=paul. That sort of thing.

On the form mail program I have a http referer checker, which checks that the script can only be used from the page the form was submitted from. The problem is that the URL will be changing all the time depending on what information is being sent through to the form in the first place. Hence the URL referer changes, it gives me the error of bad referer.

So at the end of the referer line, does CGI have any wildcards like .* that I can use?

thanks
 
So let me understand you correctly. You have a script to make sure that whoever uses the mail script is from a certain domain or domains. I assume this is to prevent everyone on the internet using the script. You are trying to make this function respond to a wildcard? It can be done in CGI and you can also role the whole process into onescript instead of crossing languages. The functions that VB and ASP are doing can both be done with CGI.

Give a little more detail and we may be able to come up with some code. Sending mail is simple stuff and pretty easy to play with.
 
Yep Haunter that's pretty much correct. I have the ASP pages set up already, I am just editing a CGi script to get the mail to work. So I don't really want to mess around too much creating everything in CGI.

I guess I just need the code for a wildcard in CGI, the line looks like:

if ($::pERLBUILDER) {
$ENV{'HTTP_REFERER'} = ' }

This is the name of the page, but the problem is the ASP code changes after parameters have been set, hence the name of the referer also changes.

Any ideas?
 
That line doesn't TEST the referer, it SETS it. You should be looking for a line with HTTP_REFERER in the if condition itself. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Hi again,

Yes Haunter, that's exactly what I'm trying to do, I'm only really using asp to grab the data because it's easier :)

Giving that that line I posted does indeed SET the condition, I still need to know if there is a solution as simple as inserting a wildcard character at the end of the URL in the statement, or is a lot more programming required?

cheers
 
Status
Not open for further replies.

Similar threads

Replies
1
Views
32

Part and Inventory Search

Sponsor

Back
Top