Previous Thread
Next Thread
Print Thread
Rate Thread
#101577 11/01/2000 11:51 AM
Joined: Oct 2000
Posts: 6
Junior Member
Junior Member
Offline
Joined: Oct 2000
Posts: 6
Hi All,

I am writing a "send this url to your friends script" and need to get the url that user came from and place this in a form element.

Is this possible?

Thanks

Mark

Sponsored Links
#101578 11/01/2000 3:07 PM
Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
Place this variable where you want the URL to show or send:

$ENV{'HTTP_REFERER'}

#101579 11/01/2000 8:17 PM
Joined: Sep 2000
Posts: 138
Em8 Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
Could I use somthing like:
Code
code:
to make spaces pluses?

------------------
Quote
quote:
-That guy was an ideot!

This message has been edited by Em8 on November 01, 2000 at 07:20 PM

#101580 11/02/2000 11:29 AM
Joined: Oct 2000
Posts: 6
Junior Member
Junior Member
Offline
Joined: Oct 2000
Posts: 6
Okay I know how to retreive the URL, how do I place it into the subject of the email.

Please see the code below, very simple I know but I don't need anything more complicated than this.

#!/usr/bin/perl

use CGI;

$co = new CGI;

print $co->header,

$co->start_html
(
-title=>'mail a friend',
-author=>'Mark',
-BGCOLOR=>'white',
-LINK=>'red'
);

if ($co->param()) {

$from = $co->param('e-mail');

$from =~ s/@/@/;

# $subject = $co->param('subject');

$text = "$ENV{'HTTP_REFERER'}";

$text =~ s/
open(MAIL, '| /usr/lib/sendmail -t -oi');

print MAIL <To: [email protected]
From: $from
Subject: you have got to see this
$text
EOF

close (MAIL);
}

Thanks

Mark

#101581 11/02/2000 3:24 PM
Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
Have you tried the script yet and it hasn't worked? Seems like you get the referer and you put it in there correctly

Sponsored Links
#101582 11/02/2000 7:35 PM
Joined: Sep 2000
Posts: 138
Em8 Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
I thought it was -t -oeq

------------------
Quote
quote:
-That guy was an ideot!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)