SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Keywords Refferr

    I know that using PHP i can use the http_referer to get the referring search engine, or referring domain name, but if a user came through a search engine how would i get the keywords used?

    Would the http refer for google be www.google.com, or http://www.google.co.uk/search?hl=en...rch+Text&meta=

    so i could get the keywords by splitting the string from hl=en to &meta. Infact, how do i split between two points? I know that once i have the $q variables i can slpit it through explode("+"), but how do i get the $q var?

    Also, what goes in the meta in the google searches? Is it worth pulling it out if i can get it?

    Many Thanks

  2. #2
    SitePoint Wizard mark_W's Avatar
    Join Date
    Mar 2004
    Location
    West Midlands, United Kingdom
    Posts
    2,631
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, could you somehow use parse_url on the refering url.

    That would break it up an include items after the ? etc?

    Mark.

  3. #3
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also peeps, if i used include to include a script that got the referrer and saved data etc, would http_refer be the file that did the include? would i need to pass the http_refer on?

    Thx


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •