Solved

Parsing Search Engine Keywords From Referral URL

Posted on 2004-08-25
3
381 Views
Last Modified: 2012-05-05
Hello,

Does anyone know of any ASP.NET specific information on parsing the key terms from a referral URL for all the major search engines? Trying to display targeted ads dynamically based on the referral URL and am having difficulty finding resources on the subject that aren't years old and written in PHP or Perl.

Thanks
0
Comment
Question by:mskibbz
3 Comments
 
LVL 17

Accepted Solution

by:
AerosSaga earned 500 total points
Comment Utility
Just find the characters used to delimit the keywords and write a little parsing routine, you can use the php or pearl ones as examples or to find the delimitation characters.  Heres a little example of how to parse for delimited character pattern:

HttpContext.Current.User = New GenericPrincipal(User.Identity, Split(authTicket.UserData, ","))

This splits comma seperated values, you should easily be able to adapt this and use something like this for additional referrer information.

Response.Write("<TABLE><pre>")
If Not Request.UrlReferrer Is Nothing Then
   Response.Write("<TR><TD>Referer</td><td>" & Request.UrlReferrer.ToString() & "</td></tr><pre>")
Else
   Response.Write("<TR><TD>Referer</td><td>blind (no referer)</td></tr><pre>")
End If

Response.Write("<TR><TD>User Agent</td><td>" & Request.UserAgent() & "</td></tr><pre>")
Response.Write("<TR><TD>Host Address</td><td>" & Request.UserHostAddress.ToString & "</td></tr><pre>")
Response.Write("<TR><TD>Host Name</td><td>" & Request.UserHostName & "</td></tr><pre>")
Response.Write("</TABLE>")

Regards,

Aeros
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now