Re: IP Push I Guess ??

by Complex <complex_hwg(at)yahoo.com>

 Date:  Fri, 30 Nov 2001 08:44:29 -0800 (PST)
 To:  HWG Techniques <hwg-techniques(at)hwg.org>
 In-Reply-To:  opalintel
  todo: View Thread, Original

--- John Murray <jmnc(at)lis.net.au> wrote:
> If I send a form to a script that the sends back some html, the
> browser
> displays that.
> 
> Now, obviously it's an IP address thing. You know, you pass your IP
> address
> along with the form data when you click submit.
<snip>
> My endpoint is this. I want to be able to send a form to a remote
> script and
> then have that script call a script on my server that writes a file
> AND
> sends html back to the browser whose form started the whole process.
> 
> I use perl.
> 
> Any thoughts, leads or answers?
> 
> T.I.A.
> 
> 
> John
> 

I don't know how relevant the IP address is to your question, but your
facts sound straight. (Any gurus want to comment?) I have hacked Perl,
but can't write it by myself.

When you submit your form, its info gets sent to the CGI, the script,
that's named in your form tag. That CGI can put together some HTML and
send it back to your browser. Or the CGI can get another script or
program to put the HTML together, instead, but I think that's more
complex than you need.

Examine any form-handling perl script, and you will probably find some
code for returning HTML to the browser. For example, here is some code
(written by someone else) buried in one of the scripts I use:

print "Content-type:text/html\n\n"
print <<__W3__;

< H1>Missing Data!< /H1>
< B>Please press the back button and fill in 
all required fields!< P>< /B>

__W3__
exit;


I broke all of those tags on purpose, of course.

I leave it to you to hack the script yourself. You probably know more
about Perl than I do.

hth,
complex


BTW, this is really off topic, but: What keeps you from just sending
info to any ol' IP address? Nothing, I guess, but what happens to the
info when it gets there will depend on the people who wrote and
maintain the script in question. You can write scripts to only accept
info (that says they're) from a certain website, and you can write
scripts that only send results back to a certain address. That sort of
security can be a good idea, since otherwise you could use a person's
script to send results, well, anywhere. Also, the extra traffic through
the script will probably be unwelcome.

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA