www.webdeveloper.com
Results 1 to 5 of 5

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

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    1

    Exclamation 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?????????????

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    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.

  3. #3
    Join Date
    Mar 2011
    Posts
    81
    Quote Originally Posted by kanishka.ucsc View Post
    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.
    Last edited by misfitplanet; 04-21-2011 at 03:45 AM.

  4. #4
    Join Date
    Dec 2002
    Location
    St. Louis, MO, USA
    Posts
    1,582
    Unethical. The only people who do this are people trying to load virus after virus (or malware/spyware) onto a user's computer, preventing the user from stopping the process. Give it up.
    |||||
    o . Q
    ___ "You live and you learn; or you don't live long." - Lazarus Long

    ^_^

  5. #5
    Join Date
    Mar 2011
    Posts
    81
    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles