Web Analytics Made Easy -
StatCounter google keywords separated? - CodingForum

Announcement

Collapse
No announcement yet.

google keywords separated?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • google keywords separated?

    hi

    i have a script working fine and collecting the information about the URL from which user came to my website.referring page i mean.

    e.g

    http://www.google.co.uk/search?q=map...e+Search&meta=

    http://search.yahoo.com/search?fr=ie...thekarachi.com

    But i dont know how to separate the keywords out of this search string.

    Is there any script or way i can separate the keywords like "map of rawalpindi"....."thekarachi.com" from such string automatically and write that to a file??

    any1?
    Move on....

  • #2
    I'm not sure what you mean.

    I think w-you want to get the value for $_GET['q'] which will always contain the keywords (and then an
    explode('+', $_GET['q'] )
    will get you an array with the keywords. For the domain, its $_GET['p'].

    Or do the querystring-variablenames change?

    If you want to search on the valueformat, then you need to use regex.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

    Comment


    • #3
      you'll need to write a regular expression to grab the actual search keywords section of the URL which will be unique to each search engine.

      Then you can just explode it by '+' to give you an array of values.
      "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

      (Me Me Me Me Me Me Me Me Me)

      Comment

      Working...
      X