Gossamer Forum
Home : Products : Links 2.0 : Customization :

LWP URL Checker mod

Quote Reply
LWP URL Checker mod
Hi,

I'd like to try this mod, but I'm not sure about the agent needed.

This is mentioned on http://www.gossamer-threads.com/...es/Detailed/547.html .

I did some searches for UrlScope 8.0, but no luck. How do you tie together something like UrlScope 8.0 with the LWP URL Checker mod?

Where can I get UrlScope or something like it?

Many thanks.

------------------
www.armynavy.com
MilitarySurplus Ring




Quote Reply
Re: LWP URL Checker mod In reply to
No, there is nothing needed but LWP and the code on my page. The thing URLSCOPE 8.0 is only there for log files of the peoples sites add.cgi visits, so when they look in their log, they see UrlScope or whatever you make that. So its just a way to identify the code.
Quote Reply
Re: LWP URL Checker mod In reply to
Thanks a ton.

------------------
www.armynavy.com
MilitarySurplus Ring




Quote Reply
Re: LWP URL Checker mod In reply to
I plugged in the code, but keep getting the following error, even though I know that armynavygame.com exists:

Code:
# Validate the form input..
$status = &validate_record(%in);
my $URL = ($in{'URL'});
$ua = new LWP::UserAgent;
$ua->agent("WebWitch 8.0");
$ua->timeout(30); # set this to what you want in seconds.
$req = new HTTP::Request 'GET' => ($in{'URL'});
$res = $ua->request($req);
if ($res->is_error) {
&site_html_add_failure ("URL: $in{'URL'} -" . " " . $res->code . " " . $res->message);
return;
} if ($res->is_success) {


#Send the user to the confirmation page
&site_html_add_confirm;
}
else {
&site_html_add_failure($status);
}
}

Do you think the Confirmation Page mod that I put in might be causing the problem?

Thanks.

------------------
www.armynavy.com
MilitarySurplus Ring




Quote Reply
Re: LWP URL Checker mod In reply to
Ok then, if that came on its own 500 internal server error page, that means you probably don't have the URI modules in the right folder or not at at all. I don't see how all of that would come in on the error page but if it did, just go get those modules and put them in the auto/URI/URL folder.
Quote Reply
Re: LWP URL Checker mod In reply to
Thanks.

I've contacted my host about installing the URI module.

Much appreciated, and thanks for this mod.

------------------
ARMYNAVY.COM
MilitarySurplus Ring





Quote Reply
Re: LWP URL Checker mod In reply to
I checked, and my host does not have the URI module installed.

The big thing is that I don't have a clue about what the URI module is, where to get it, or how/where to install it.

Would anybody be able to give me the basics on getting the URI module and setting it up?

Many thanks in advance.

------------------
ARMYNAVY.COM
MilitarySurplus Ring





Quote Reply
Re: LWP URL Checker mod In reply to
You can get URI from here and most other modules needed for perl. http://www.perl.com/...01modules.index.html

Now, first i would suggest putting this at the top of useragent.pm
use lib '/data1/hypermart.net/lookhard/look-bin/Look'; of course with the path to the directory uri.pm and stuff is in. Don't worry this won't mess up the way everything else is called from your host because their directories for perl are still in the INC. This should work but write back here if it doesn't.
Quote Reply
Re: LWP URL Checker mod In reply to
Bmxer,

I went to the address that you mentioned (I had also been poking around perl.com, but didn't quite find the downloadable stuff). They offered 3 URI's:

Quote:
URI GAAS LWPng-alpha-0.24.tar.gz 83k 12 Apr 1999
URI GAAS URI-1.04.tar.gz 76k 02 Aug 1999
URI GBARR perl-ldap-0.12.tar.gz 50k 28 Jun 1999

Do you know which one I should try?

Also, what is uri.pm, and where do I locate it?

Thanks.


------------------
ARMYNAVY.COM
MilitarySurplus Ring







[This message has been edited by TrainedMonkey (edited October 10, 1999).]
Quote Reply
Re: LWP URL Checker mod In reply to
 http://www.perl.com/...GAAS/URI-1.04.tar.gz The second one was the one you should get, if your host already has lwp.