Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Get Referral From SSL

by themage (Friar)
on Jul 20, 2005 at 12:52 UTC ( [id://476487]=note: print w/replies, xml ) Need Help??


in reply to Get Referral From SSL

If you don't have access from server A to server B, I'ld simply use some key appended to the end of the URL, like this:

On server A (using mason):
use Digest::MD5 qw(md5_hex); my $ip=$r->connection->remote_ip(); my $url="/gotohere/"; my $basekey="somespecialkeyequalinsiteaandsiteb"; my $sid=md5_hex("$ip;;$url;;$basekey"); $url="http://www.siteb.com$url?sid=$sid"; $r->redirect($url);

In a autohandler on site B:
use Digest::MD5 qw(md5_hex); my $sid=$ARGS{sid}; my $url=$r->uri(); my $ip=$r->connection->remote_ip(); my $basekey="somespecialkeyequalinsiteaandsiteb"; my $vsid=md5_hex("$ip;;$url;;$basekey"); if ($sid eq $vsid) { $m->call_next(); }


The same can be used in CGI or ModPerl, with small changes, I think.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://476487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-24 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found