<html><div style='background-color:'><DIV class=RTE>
<P>Hi all,</P>
<P>I am trying to write a script to retrieve a web page. the script is detailed below. My problem is as follows. </P>
<P>The script can successfully obtain web pages such as&nbsp; <A href="http://news.bbc.co.uk">http://news.bbc.co.uk</A> and <A href="http://www.dreamteamfc.com">http://www.dreamteamfc.com</A> </P>
<P>However it fails on the following URL<BR><A href="http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1&amp;title=GOALKEEPERS&amp;gameid=167">http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1&amp;title=GOALKEEPERS&amp;gameid=167</A></P>
<P>The returned web page (saved in myOUT.txt) contains<BR>&lt;HTML&gt;&lt;HEAD&gt;&lt;SCRIPT LANGUAGE="JAVASCRIPT"&gt;location.replace("<A href='http://www.dreamteamfc.com");</SCRIPT></HEAD></HTML'>http://www.dreamteamfc.com");&lt;/SCRIPT&gt;&lt;/HEAD&gt;&lt;/HTML</A>&gt;</P>
<P>The above URL is valid as I have pasted into my browser and it displays OK. The above URL is part of the <BR><A href="http://www.dreamteamfc.com">http://www.dreamteamfc.com</A> page and is obtained via a javascript:dt_pop (Whatever that is). <BR>Anyway here is the script, any ideas ?? Thanks</P>
<P>#!/usr/bin/perl -w </P>
<P>use URI;<BR>use LWP::Simple;<BR>use LWP::UserAgent; </P>
<P>my $ua = LWP::UserAgent-&gt;new(); </P>
<P>$ua-&gt;proxy('http', 'http://128.87.251.250:8080');</P>
<P>#my $content = get("<A href="http://news.bbc.co.uk">http://news.bbc.co.uk</A>");<BR>my $content = get("<A href="http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1&amp;title=GOALKEEPERS&amp;gameid=167">http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1&amp;title=GOALKEEPERS&amp;gameid=167</A>");<BR>#my $content = get("<A href="http://www.dreamteamfc.com">http://www.dreamteamfc.com</A>");</P>
<P>$script = "myOUT.txt";<BR>unlink $script;<BR>open (OUT,"&gt;&gt;$script") || die "cannot open $script for open";</P>
<P><BR>if (defined $content)<BR>{<BR>&nbsp;&nbsp;&nbsp; #$content will contain the html associated with the url mentioned above.<BR>&nbsp;&nbsp;&nbsp; print OUT $content ;<BR>}<BR>else<BR>{<BR>&nbsp;&nbsp;&nbsp; #If an error occurs then $content will not be defined.<BR>&nbsp;&nbsp;&nbsp; print "Error: Get stuffed";<BR>}<BR>close OUT;<BR><BR><BR></P></DIV></div><br clear=all><hr>Fed up of receiving junk e-mail? Find out how to deal with  <a href="http://g.msn.com/8HMAENUK/2746??PS=47575">spam here.</a> </html>