How to redirect user to our page when he is trying to leave our page????

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to redirect user to our page when he is trying to leave our page????

hi guys,
what i want to do is i need to make all clients to go through my custom .php page when they are trying to leave from my web page.this is to develop a billing system for internet access.i need to capture there time spent on internet.i need to direct them to my web page all the time they enter an url in address bar.each and every time they try to go to a new site by entering url in the address bar they need to go through my .php page.is that possible using javascript?????????????

No, it is not possible. Nor should be. What you intend to do is malicious. As a user I want to leave a site whenever I want and go wherever I want. How could you imagine that you have the right to restrict my rights as a regular user ?

You can capture the time spent on your site by simply using a server-side session variable and a database. Nothing fancy.

hi guys,
what i want to do is i need to make all clients to go through my custom .php page when they are trying to leave from my web page.this is to develop a billing system for internet access.i need to capture there time spent on internet.i need to direct them to my web page all the time they enter an url in address bar.each and every time they try to go to a new site by entering url in the address bar they need to go through my .php page.is that possible using javascript?????????????

I have this happen and I agree with Kor that is seems Malicious. I hate to have my ass pulled back to a site when I want to leave. I ban those sites straighway. If you are somehow trying to keep integrity of their data, (something they would want done.) you really should trying something else. IF this is something that must happen, I would experiment with a something that works like a proxy site. You know the ones where you can access myspace at at an educational institution that blocks it You would provide a input address for the user. They will type the url there instead on in the browser. , you make the xmlhttprepest and display the page inside your JavaScript. Any malicious intent on your par will raise red flags for a user because this is not a conventional way to use a browser. It must absolutely necessary and you must make this absolutely clear to the users why it must be done this way. If they feel no direct benefit and suspicion , they may just leave your website and never return.

The only reason that pops to my mind is a cafe type browser that charges for time use. In that case you will need design an extenston for the broswer to hide the address bar and any quck key that can bring up a location bar. and focuse on a custom address bar in which you handle all http requestions in your script.

I'm curious. Is this a lease? Are renting your computer out by the hour? You said you need to capture the time spent on the internet. If it's only time, the computer has a clock on it. If you are trying filter content that is different, i.e., parental control. It would also be unethical to bill them for web content you do not own. So why not just set a timer and forget about redirection? Why this redirection? If only just want them to keep going back to your page, just so you could get hits , oh, there are ways to trap a person to do that, but you wont get that from me because I despise that unethical way of monetary gain and its a very irritating experience to the user. Such abuse may be considered fraud and and person who does this intentionally may wind up in jail if reported. I'm not saying your're doing this, but you need to provide more details to why this is so necessary.

then again, is this a proxy? Proxy can have many legitimate uses that fit your description?