Home All Groups Group Topic Archive Search About

need to convert google search ref to find what the user search

Author
6 Oct 2006 9:46 AM
yuvalbra
I work in asp envirments.
i get the ref url that come to my site and i want to convert it to find
out what was the query in (google or other searcher sites)

foe example : if someone goes to google and search some text and my
site was in his resaults and he click on it , in my site i see his link
ref like
http://www.google.co.il/search?hl=iw&q=%D7%9B%D7%9C%D7%99%D7%9D+%D7%97%D7%93+%D7%A4%D7%A2%D7%9E%D7%99%D7%99%D7%9D+%D7%9C%D7%90%D7%A4%D7%99%D7%94&btnG=%D7%97%D7%99%D7%A4%D7%95%D7%A9+%D7%91-Google&meta=

i want to know (in asp and save it to DB) what was the word or words
that the user write in search engine.

BR
Yuv

Author
6 Oct 2006 11:07 AM
Ray Costanzo [MVP]
You could try passing the string into a URLDecode function and parsing out
the data.

Here's a function found at http://www.thescripts.com/forum/thread52476.html

Function URLDecode(sText)
    sDecoded = sText
    Set oRegExpr = CreateObject("VBScript.RegExp")
    oRegExpr.Pattern = "%[0-9,A-F]{2}"
    oRegExpr.Global = True
    Set oMatchCollection = oRegExpr.Execute(sText)
    For Each oMatch In oMatchCollection
        sDecoded = Replace(sDecoded, oMatch.Value, Chr(CInt("&H" &
Right(oMatch.Value, 2))))
    Next
    URLDecode = sDecoded
End Function

Ray at work

<yuval***@gmail.com> wrote in message
Show quoteHide quote
news:1160127982.970179.163040@i42g2000cwa.googlegroups.com...
>I work in asp envirments.
> i get the ref url that come to my site and i want to convert it to find
> out what was the query in (google or other searcher sites)
>
> foe example : if someone goes to google and search some text and my
> site was in his resaults and he click on it , in my site i see his link
> ref like
> http://www.google.co.il/search?hl=iw&q=%D7%9B%D7%9C%D7%99%D7%9D+%D7%97%D7%93+%D7%A4%D7%A2%D7%9E%D7%99%D7%99%D7%9D+%D7%9C%D7%90%D7%A4%D7%99%D7%94&btnG=%D7%97%D7%99%D7%A4%D7%95%D7%A9+%D7%91-Google&meta=
>
> i want to know (in asp and save it to DB) what was the word or words
> that the user write in search engine.
>
> BR
> Yuv
>
Are all your drivers up to date? click for free checkup

Author
17 Oct 2006 10:40 AM
yuvalbra
Thanks  Ray for your answer ,

but it's not working with the hebrew text (i got some of signs )

do you know how to fix it ?

Yuv

Ray Costanzo [MVP] wrote:
Show quoteHide quote
> You could try passing the string into a URLDecode function and parsing out
> the data.
>
> Here's a function found at http://www.thescripts.com/forum/thread52476.html
>
> Function URLDecode(sText)
>     sDecoded = sText
>     Set oRegExpr = CreateObject("VBScript.RegExp")
>     oRegExpr.Pattern = "%[0-9,A-F]{2}"
>     oRegExpr.Global = True
>     Set oMatchCollection = oRegExpr.Execute(sText)
>     For Each oMatch In oMatchCollection
>         sDecoded = Replace(sDecoded, oMatch.Value, Chr(CInt("&H" &
> Right(oMatch.Value, 2))))
>     Next
>     URLDecode = sDecoded
> End Function
>
> Ray at work
>
> <yuval***@gmail.com> wrote in message
> news:1160127982.970179.163040@i42g2000cwa.googlegroups.com...
> >I work in asp envirments.
> > i get the ref url that come to my site and i want to convert it to find
> > out what was the query in (google or other searcher sites)
> >
> > foe example : if someone goes to google and search some text and my
> > site was in his resaults and he click on it , in my site i see his link
> > ref like
> > http://www.google.co.il/search?hl=iw&q=%D7%9B%D7%9C%D7%99%D7%9D+%D7%97%D7%93+%D7%A4%D7%A2%D7%9E%D7%99%D7%99%D7%9D+%D7%9C%D7%90%D7%A4%D7%99%D7%94&btnG=%D7%97%D7%99%D7%A4%D7%95%D7%A9+%D7%91-Google&meta=
> >
> > i want to know (in asp and save it to DB) what was the word or words
> > that the user write in search engine.
> >
> > BR
> > Yuv
> >

Bookmark and Share