<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1000635" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1000635</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002731</link>
    <description> &lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;the HTTP_REFERER gives you the name of the &quot;calling&quot; document.&lt;/p&gt;
&lt;p&gt;So if you try to build your stats via a &quot;cgi-image&quot; (try  &lt;a href=&quot;http://webhome.nu/cgi-bin/wh.pl?wmf&quot; class=&quot;bb-url&quot;&gt;http://webhome.nu/cgi-bin/wh.pl?wmf&lt;/a&gt; ) you&#039;ll get the URL of the page linking the image.&lt;/p&gt;
&lt;p&gt;If your &quot;index.html&quot; is a CGI you&#039;ve got a pretty good chance to get the real refering-url.&lt;/p&gt;
&lt;p&gt;Otherwise you could try to extract the last-urls via JavaScript from the browser.&lt;br /&gt;
But that&#039;ll be a JavaScript question.&lt;/p&gt;
&lt;p&gt;ciao&lt;br /&gt;
Anti&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
Visit my work in progress at&lt;br /&gt;
  &lt;a href=&quot;http://webhome.nu/&quot; class=&quot;bb-url&quot;&gt;http://webhome.nu/&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 11 May 1999 22:41:00 +0000</pubDate>
 <dc:creator>anti</dc:creator>
 <guid isPermaLink="false">comment 1002731 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002730</link>
    <description> &lt;p&gt;&amp;lt;-- split the the string on /&lt;/p&gt;
&lt;p&gt;every http url will have this form:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://domain.topleveldomain/path&quot; title=&quot;http://domain.topleveldomain/path&quot;&gt;http://domain.topleveldomain/path&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;the text between the 2nd and 4rd / is always your domain.&lt;/p&gt;
&lt;p&gt;There is a bug in that script though.&lt;/p&gt;
&lt;p&gt;URLs have this general form protocol:path&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;a href=&quot;mailto:mu@intertainment.org&quot; title=&quot;mailto:mu@intertainment.org&quot;&gt;mailto:mu@intertainment.org&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;///c:/path&quot; title=&quot;///c:/path&quot;&gt;file:///c:/path&lt;/a&gt;&lt;br /&gt;
someProtocol:^^^&amp;amp;&amp;amp;%$#@are&lt;br /&gt;
These are all possible values of the http referrer and especially the 1st two are likely to appear in your log file.&lt;/p&gt;
&lt;p&gt;So, you should check first whether the URL contains http and then make the split.&lt;/p&gt;
&lt;p&gt;Later,&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
Malte Ubl&lt;br /&gt;
 &lt;a href=&quot;http://goKewl.com&quot; class=&quot;bb-url&quot;&gt;http://goKewl.com&lt;/a&gt;&lt;br /&gt;
Germany&lt;/p&gt;
 </description>
     <pubDate>Tue, 11 May 1999 16:16:00 +0000</pubDate>
 <dc:creator />
 <guid isPermaLink="false">comment 1002730 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002729</link>
    <description> &lt;p&gt;Thanks for the help popus!&lt;/p&gt;
&lt;p&gt;Im just wondering when doing&lt;br /&gt;
$referer = $ENV{&#039;HTTP_REFERER&#039;};&lt;br /&gt;
(@parts)= split(/\//,$referer);&lt;br /&gt;
$domain = $parts[2];&lt;/p&gt;
&lt;p&gt;What 2 parts are actually being split?&lt;br /&gt;
and since im not too familiar with the split *thingy* , what does the /\// &#039;stand for&#039;  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/ubbhtml/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 May 1999 23:08:00 +0000</pubDate>
 <dc:creator>Dass</dc:creator>
 <guid isPermaLink="false">comment 1002729 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002728</link>
    <description> &lt;p&gt;Sorry ... it should be $parts[2] instead of $parts[3].&lt;/p&gt;
&lt;p&gt;Good luck  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/ubbhtml/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
Cheers &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;br /&gt;
  Polpus&lt;br /&gt;
 &lt;a href=&quot;http://wdresources.cjb.net&quot; class=&quot;bb-url&quot;&gt;http://wdresources.cjb.net&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 May 1999 00:45:00 +0000</pubDate>
 <dc:creator />
 <guid isPermaLink="false">comment 1002728 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002727</link>
    <description> &lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The HTTP_REFERER enviromental variable retrives the full url of the refering document (not just the domain).&lt;/p&gt;
&lt;p&gt;You can still split up this variable to ge just the domain.&lt;/p&gt;
&lt;p&gt;I&#039;m not pretty sure, but I think it would be something like this:&lt;/p&gt;
&lt;p&gt; &lt;BLOCKQUOTE&gt;quote:$referer = $ENV{&#039;HTTP_REFERER&#039;};&lt;br /&gt;
(@parts)= split(/\//,$referer);&lt;br /&gt;
$domain = $parts[3];&lt;/blockquote&gt;&lt;br /&gt;
Now you should have the domain stored in the $domain variable.&lt;/p&gt;
&lt;p&gt;Hope this helps you.&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
Cheers &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;br /&gt;
  Polpus&lt;br /&gt;
 &lt;a href=&quot;http://wdresources.cjb.net&quot; class=&quot;bb-url&quot;&gt;http://wdresources.cjb.net&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 May 1999 00:43:00 +0000</pubDate>
 <dc:creator />
 <guid isPermaLink="false">comment 1002727 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002726</link>
    <description> &lt;p&gt;Is the&lt;br /&gt;
HTTP_REFERER&lt;br /&gt;
 what im looking for? is it the variable that gives the domain the person came from before the site?&lt;/p&gt;
 </description>
     <pubDate>Sun, 09 May 1999 23:50:00 +0000</pubDate>
 <dc:creator>Dass</dc:creator>
 <guid isPermaLink="false">comment 1002726 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-get#comment-1002725</link>
    <description> &lt;p&gt;maybe you shoud try this little script:&lt;/p&gt;
&lt;p&gt;print &quot;Content-type:text/html\n\n&quot;;&lt;br /&gt;
print &amp;lt;&amp;lt;EndOfHTML;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Print Environment&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
EndOfHTML&lt;br /&gt;
;&lt;/p&gt;
&lt;p&gt;foreach $key (sort(keys %ENV)) {&lt;br /&gt;
   print &quot;$key = $ENV{$key}&amp;lt;br&amp;gt;\n&quot;;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;print &quot;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&quot;;&lt;/p&gt;
&lt;p&gt;call it with your browser and it&#039;ll give you a list of all environment variables, just take out what you need....&lt;/p&gt;
 </description>
     <pubDate>Sun, 09 May 1999 23:28:00 +0000</pubDate>
 <dc:creator />
 <guid isPermaLink="false">comment 1002725 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
