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

Discussion in 'ASP General' started by yuvalbra@gmail.com, Oct 6, 2006.

  1. Guest

    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=כלים חד פעמיים לאפיה&btnG=חיפוש ב-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
    , Oct 6, 2006
    #1
    1. Advertising

  2. 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

    <> wrote in message
    news:...
    >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=כלים חד פעמיים לאפיה&btnG=חיפוש ב-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
    >
    Ray Costanzo [MVP], Oct 6, 2006
    #2
    1. Advertising

  3. Guest

    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:
    > 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
    >
    > <> wrote in message
    > news:...
    > >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=כלים חד פעמיים לאפיה&btnG=חיפוש ב-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
    > >
    , Oct 17, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    336
  2. Replies:
    22
    Views:
    752
    peter koch
    Apr 30, 2008
  3. Replies:
    6
    Views:
    345
    James Kanze
    Apr 29, 2008
  4. Navindra Umanee

    strong ref from weak ref?

    Navindra Umanee, Feb 12, 2005, in forum: Ruby
    Replies:
    2
    Views:
    143
    Navindra Umanee
    Feb 12, 2005
  5. Juha Nieminen
    Replies:
    13
    Views:
    608
    Edek Pienkowski
    Aug 29, 2012
Loading...

Share This Page