| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | how to strip clean a referring URL Hi I would like to show the 'domain' part of referring URLs on a web page that I'm working on. In other words - if someone is referred by.. http://www.namepros.com/newthread.php?do=newthread&f=46 .. then I'd like to just show www.namepros.com on my page. Not sure if this is at all possible, but any help will be much appreciated! |
| |
| | #3 (permalink) |
| NamePros Regular | Many thanks for the info, Dan! I actually forgot to mention that my current hosting provider doesn't support PHP, but I may have to consider moving to one that does.Meanwhile, would you by any chance now how to accomplish this with ASP/vbscript? --------------- Added message: Just received the following script suggestion at another forum: Dim strURL, tmparray, domain strURL = Request.ServerVariables("HTTP_REFERER") tmparray = Split(strURL, "/") domain = tmparray(2) This seems to work fine, so I will use this for the time being. Thanks again! Last edited by Dutch; 12-18-2006 at 05:16 AM. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |