Get Original Referrer URL from Google Search with PHP?
628
I am using$_SERVER['HTTP_REFERER'];
, to getting Referrer URL.
When I typed in Google search box theq='some text'
`https://www.google.com.pk/#hl=en&output=search&sclient=psy-ab&q=some text%2Ftestbulkresponse&oq=some text%2Ftestbulkresponse&gs_l=hp.3...15460.24280.1.25007.30.30.0.0.0.0.325.7136.2-27j3.30.0...0.0...1c.1.8.hp.dAvuch3bBg4&psj=1&bav=on.2,or.r_qf.&bvm=bv.44697112,d.ZWU&fp=980e418276b62e8c&biw=1366&bih=595`
but when I get this URL on my website using as$_SERVER['HTTP_REFERER'];
theq=null
like this
`http://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC0QFjAA&url=http%3A%2F%2Fwww.bulkresponse.com%2Ftestbulkresponse%2Fdashboard.php&ei=r9NbUfv7GcjaOYDdgKgC&usg=AFQjCNF9U_DpJEwupZ0ZLPbjWJ6DQLWZcA&bvm=bv.44697112,d.ZWU`.
So I am unable to get searched keywords in Google, what should I can do to get searched keywords?
Answer
Solution:
Google removes the search query for HTTPS connections and logged users so the only way to know the search query is using Google Analytics
http://googleblog.blogspot.com.es/2011/10/making-search-more-secure.html http://analytics.blogspot.com.es/2011/10/making-search-more-secure-accessing.html
Answer
Solution:
Try this.
References:
http://php.net/parse_url
http://php.net/parse_str
Answer
Solution:
it doesn't work everytime, especially now with their updates. I get " &esrc=s " reported a lot.