hi, I want to redirect user to another website, even if user clicks STOP button after a small intveral of time (5 seconds)… I am trying the following code, but it doesnt redirect
It’s not “almost” impossible; it’s IMPOSSIBLE. Sure, you can make it more difficult, but it’s not worth the time: the people that you are really worried about - those people who will steal your code / content and set up clone sites - will not be stopped by your trivially undone techniques. Logic is on their side; you cannot stop them. At all. Ever.
Your time is much better spent elsewhere. Abandon this doomed crusade to hide your code and channel that effort into making a great website. If you are concerned about other people stealing your content, there are services such as Copyscape that can help you tackle that problem. Rather than trying to prevent theft, focus on detection and recovery.
Much of this reply assumes that your reason for hiding your source code is to prevent theft of content. If you have another motive, tell us why you want to protect your source code and you may receive other suggestions.
I understand its almost impossible to stop code fro stealing, however with techniques like sessions etc we can somehow make it difficult to show code. I have managed to hide in IE and FF…
anyhow is there anyway to close XUL window of Firebug ? I know like Yahoo and GMail they check if the console of Firebug is open to detect, but if console it no open, they cannot even detect…
When you and I are talking on the phone and you hang up I can talk all I want but you’ll never hear it.
The same goes for the stop button in the browser, it breaks the connection between the client and the server so the server can do send all it wants, but the client will never receive it.
That being said you can achieve what you want by putting a meta redirect in the <head> of your HTML
Seeing this thread made me smile, and reminded me about this thread on another forum. There was lots of discussion, and even some proofs of concept, but ultimately it is impossible. We now call that discussion the Infinite Thread - have a read if you’re bored and have a few hours to spare.
Last possibility would be javascript’s setTimout function.
Of course that doesn’t work if the browser of the visitor doesn’t support javascript or the visitor has turned it off …
thanks but meta refresh will also stop if users clicks STOP button. Is there anyway to run a script like redirection once user clicks stop in browser ?
what am trying to do, is display html code, with the help of ob_flush() it doesnt display my code (view source), however if users clicks stop, they can view source which I dont want…
is there anyway to RUN a javascript with AJAX or any solution even id user clicks stop button…
You can’t.
ignore_user_abort only assures that the script will not end when PHP detects the user has aborted the connection. The connection, once aborted by the user, is gone.