0

I am using Windows7 with IE9. I want to extract the URL form the address bar of the IE9 browser.

The user will type one URL in the browser, like

www.google.com

and press enter button or any click event (like GO button or Search button in Firefox) . I want to connect a script program with this enter enter button or click event. Then this complete URL should be pass to the that script program for parsing the URL.

I wrote my script in a php file like,

{

$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

}

i want to execute this code when the user press the enter button in web browser.

Can anybody explain the procedure...................

Can i use the browser events to extract the URL from the browser?

Is this browser good for this process.......? Thanks in advance

3 Answers3

0

So you want to trojan-horse a user to get their browser history?

I don't think you can use PHP to get that :)

gelleby
  • 108
  • 8
  • which method should i use to get complete url from the address bar in the browser? – Rincy Raphael Oct 31 '13 at 15:21
  • Maybe you can get some info here: http://stackoverflow.com/questions/11556781/can-we-get-browser-history-by-using-javascript or here: http://stackoverflow.com/questions/3277913/is-it-possible-to-detect-a-visitors-browsing-history-using-javascript-or-php – gelleby Oct 31 '13 at 15:34
0

if i understand you right, you want to know to which address user leaves a page. In this case use javascript to capture the unload event and then use ajax to save the address like here: Detect when a user leaves a website

Community
  • 1
  • 1
Zali
  • 311
  • 2
  • 5
  • How can i integrate the php program with the Search button in Firefox browser ? I want to execute the php program in the background of browser – Rincy Raphael Oct 31 '13 at 15:16
  • It can not be explained just in a few words. Read about ajax and jquery. – Zali Oct 31 '13 at 16:58
0

You would probably need javascript for something like this. PHP will not know about a user's key presses in the browser.

Check out jquery. :)

virtuexru
  • 858
  • 1
  • 6
  • 16