Hello, I need to know a way where I can prevent somebody from downloading a webpage off of my server. This webpage is currently encrypted, and it prevents right clicking and selecting of text. But you can still download it to your computer. How can I prevent the downloading of the webpage to their computer? I thought some PHP script could do the trick. Maybe have a script view the webpage in a redirected frame or something? I am really curious if this can be done. I have been looking all over and came up with nothing so far.
If you can view the website in your browser you are essentially downloading the webpage to your computer. What you are trying to do is impossible and impractical.
This can be easily bypassed by disabling Javascript on the browser... This takes like 5 seconds. There is no way to achive what you and 12344232424 other people are trying to do. Plus it's not the point of the internet. If you don't want someone to be able to view your stuff, then simply don't put it online.
The only solution to your problem is: do not make any data available on the internet that you do not want people to download to their computers. That works 100% of the time. matthrerobertbell and the others are absolutely correct. When a web browser views a page, it has downloaded the page and is rendering it locally. A copy is kept in a temporary directory on the hard drive, but it will often be deleted after the person closes their web browser. Adding password protection and so forth to pages does not protect them. Scripts can be written which act like a person and save your page to a file on a computer so that it can be viewed at their leisure.
There might be other options you might consider. If you are trying to prevent "bad bots" from scraping your site you can set up a link to a page that will ban the ip (this can be done in php). Then you have to set your robots.txt file to keep the "good bots" (ie. google, yahoo, etc) out of that particular area. You can also use the robots.txt file to keep the SE's from indexing pages you do not want people to find through searching.
Of course you can protect your webpage. I have created a program called "Ultimate Hider" which takes the webpage, displays a tiny section of if, requires the user to clear their history, then display another section and so on. Its pretty fast and people can view one webpage in less than 1 week, but unfortunately it is not in public yet. On the serious note, you can never ever protect people from downloading the internet. Peace,
Jason - what are you trying to protect? Perhaps if we know the actual problem we might find a better solution?
Yeah instead of every just being real sarchastic and not helpful in the slightest.... I can think of a way to hide the source of a page and just display a javascript function....
Ultimately though that (something ajaxy, right?) can be cracked too and the site won't be accessible to search engines (and you don't want to start messing with cloaking, which is also easily to overcome). Now, if we knew what Jason was trying to protect we'd know if that's an issue or not. Alot of newbies think their intellectual property is contained in the html, when it's actually in the serverside scripts and they go to alot of effort to protect it when there is no real "business problem". Designers, on the other hand, need to protect their images and doing that can be problematic, but by putting the bulk of the images in the CSS they can protect them from all but the most determined - and average joe wouldn't know how. So, it also depends on who the target market is. If you're trying to protect code from coders then you have to do more. If you just don't want the punters to look under the covers then that's easier.
Sounded like a challenge, I'm not going to tell anyone of my own free will how I did this, but all praise you if you can get the message hidden in comments and paste it on these pages; http://www.krakjoe.info/sekure/ Good luck
I don't have time to hack beyond the basic "Don't do it" message that is the default if the call isn't from the right location. This won't be search engine friendly and we still have to hear back from the OP as to what he's actually trying to achieve.
It's far more complicated than that I assure you, any $_SERVER global can be hacked from within the core of php...... Also, robot.txt can direct the search engines to light optimized ( but jus straight html ) pages with content in, but nothin you wanna keep private
Easy done: http://www.krakjoe.info/sekure/AjaxProcess.php?sid=0.7895397402960764 To bypass the "Don't do it" message, just fake the ref. headers (to which I don't have time to do it). Peace,
wrong again..... To convice me you actually have a clue, I'll need to see the comment I hid inside html on that page
<!-- I have hidden a number the number is : 84654651323216546543213215646548979876546532165465897169813654136365413356416415624632146451561356156413561456416361351 --> Nice try, your security would stop 99.5% of visitors from seeing your source code.
How did you do that, I am interested in knowing. Faking the headers didn't work, well I didn't push it much anyway. Peace,