<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1000906" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1000906</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/email-page#comment-1003842</link>
    <description> &lt;p&gt;Here is code to grab a URL and display it, with all the links and images intact.  You can modify it at your leisure to email a person the web page.&lt;/p&gt;
&lt;p&gt;The $ENV{REMOTE_HOST} tests are to determine if the program was called as a CGI program.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;#!/usr/bin/perl -w

# wgrab
# utility to grab URL and display normally

use CGI::Carp;
use LWP::Simple;
use strict;

my ($url,$src);

if ($ENV{REMOTE_HOST}) {
  # if sent via PATH_INFO...
  # PATH_INFO starts with a /
  $url = substr $ENV{$PATH_INFO}, 1;
}

# otherwise, value is in $ARGV[0];
$url &amp;#0124; &amp;#0124;= $ARGV[0];

die &quot;usage: wgrab URL\n&quot; unless $url;

$src = get($url);
$src =~ s!&amp;lt;head&amp;gt;!&amp;lt;head&amp;gt;\n&amp;lt;base href=&quot;$url&quot;&amp;gt;!i;

print &quot;Content-type: text/html\n\n&quot; if $ENV{REMOTE_HOST};
print $src;
[/code]

This places a &amp;lt;base href=&quot;...&quot;&amp;gt; tag inside the &amp;lt;head&amp;gt; tag.

One final &lt;em&gt;important&lt;/em&gt; note:  if you give this program a URL that is not a PAGE, but is rather a directory (as in [url=http://www.foo.com/)]http://www.foo.com/)[/url]  you MUST INCLUDE THE TRAILING SLASH.  &lt;a href=&quot;http://www.foo.com&quot; class=&quot;bb-url&quot;&gt;http://www.foo.com&lt;/a&gt;  will make the &amp;lt;base&amp;gt; tag not work correctly.

That&#039;s all for now.

------------------
-- 
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Mon, 03 Jan 2000 18:46:00 +0000</pubDate>
 <dc:creator>japhy</dc:creator>
 <guid isPermaLink="false">comment 1003842 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/email-page#comment-1003841</link>
    <description> &lt;p&gt;What script did you find?&lt;br /&gt;
If we see it we might have a better idea of what you are after...&lt;br /&gt;
JP  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 03 Jan 2000 18:32:00 +0000</pubDate>
 <dc:creator>JP Stones</dc:creator>
 <guid isPermaLink="false">comment 1003841 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/email-page#comment-1003840</link>
    <description> &lt;p&gt;I believe I know the process you are asking about.  This would entail:&lt;/p&gt;
&lt;p&gt;1. retrieving the page from the internet&lt;br /&gt;
2. adjusting all IMG tag urls to correctly source the image&lt;br /&gt;
3. adjusting all A tag urls to correctly source the URI&lt;/p&gt;
&lt;p&gt;It doesn&#039;t sound &lt;em&gt;too&lt;/em&gt; difficult a task, and I don&#039;t understand why it shouldn&#039;t be freeware -- I know there&#039;s a program called WebSnake that does this for an entire web site... oh well, capitalism is as capitalism does.&lt;/p&gt;
&lt;p&gt;I&#039;ll post some code here when I think of it.&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
--&lt;br /&gt;
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve&lt;/p&gt;
 </description>
     <pubDate>Mon, 03 Jan 2000 18:00:00 +0000</pubDate>
 <dc:creator>japhy</dc:creator>
 <guid isPermaLink="false">comment 1003840 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
