HTML - Help With Protecting Pdfs With Php
I have a web site where some of the pages are password protected using php script. This works fine on html pages, but I also have some pdf files that I want to protect.
Now the pdfs are not protected. They are linked to images in an index page and when the image is clicked, the pdf is opened in a new window. I now want to protect the pdfs. I want my users to be able to access the index page and see the images, but when they cliick the image to the view the actual pdf, they are prompted for a usercode and password. Since the protection I use on my protected html pages is based on php, I assume I will have to create a cover page for each pdf and link the index page image to that php page instead of the pdf. This I know how to do. What I don't know how to do is to have the php page open the pdf directly without user intervention and when the pdf window is closed by the user the php page also closes and returns the user to the image index page. In other words, I want the php page to be completely invisible to a user who has already logged on and invisible except for the login prompt for the user who has not yet logged on. Anyone have any suggestions? Similar TutorialsHey Folks, Newb here... I am trying to put a .pdf file in my webpage, that people will be able to download at a click. I dont want the file actually embedded in the page. I know it has to be pretty simple but cant find the answer on the web. Any help appreciated pwalsh22 Has anyone ever had trouble getting a PDF file to download from a link? On my site (http://www.banffridgechalets.com/design_plans.htm), I'm having trouble. It seems to start in Firefox but then cascades to IE (so if you try it only in IE, you may not notice the problem). You're supposed to be able to view a PDF by clicking on one of the thumbnails, but sometimes (not all the time) in Firefox, clicking on the thumb results in a blank page being displayed, and sometimes Firefox freezes. If I right click and select save as..., I can download the PDF but then it doesn't open when I double click on it. Anyone ever seen this problem? Know a solution? Just had my first product approved on Clickbank and don't want to start selling before I have protected my thank you page (where my downloads are from theft and sharing) I am new to this and I need to know how can I cloak the address of my thank you page so that it's not shared. Thanks E Ive already read all the posts about this but I need some help. I have a bunch of images in a scrollbox on my myspace. I love sharing photos with my friends but somehow my friends send me fake profiles of me. I would like to know if theres anyway to protect them whether it be by no right click, a clear gif, etc. The thing is I make my page with MyGen.UK gen and I dont know what code to use or what to do? I trust most of my close friends but I dont know why people keep using my pictures and making a fake profile. I really dont want to have to take them down so if anyone could help me out that would be great? I have found a way to protect images I have tested my code in different computer with different browsers and it works except in one browser, I didn't used javascripts or php. You can tested by going to files.combbat21.com/website/images you will see a lot of images click on a image and try to see it, now go to demo.combbat21.com every image in that page comes from files.combbat21.com/website/images try to download any image. I'm giving the code away just email me to cuestadaniel31(at)gmail.com. I have been through Google, but am unable to find a semi-simple way of doing this... Basically I am looking to make someone enter a username and password before they are allowed to view a webpage. Like... if someone goes to http://www.test.com/test1.html, a window pops up and they are forced to enter a username and password that I can specify and change for every page. So if they go to http://www.test.com/test2.html.... it would be a different UN and PW (again, that I can specify). I believe it is some sort of javascript that I need... but I cannot figure out a way to make this work without having the username and password be in some openable file that can be viewed to find out the password n such easily. Hi There! I'm trying to password protect a page in my website. I got this code from DHTML and was wondering how it could be modified so that it would display in a new window. Cus when I do it now, it just displays the page in the frame I have (and the password protected page, uses another frame so it displays as 2 frames and gets confusing). Any help would be appreciated!! function submitentry(){ password = document.password1.password2.value.toLowerCase() username = document.password1.username2.value.toLowerCase() passcode = 1 usercode = 1 for(i = 0; i < password.length; i++) { passcode *= password.charCodeAt(i); } for(x = 0; x < username.length; x++) { usercode *= username.charCodeAt(x); } //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD if(usercode==142703219952000&&passcode==1809918190080) //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD { window.location=password+".htm"} else{ alert("password/username combination wrong")} } </script> </div> <form name="password1"> <p align="left"><strong>Enter username: </strong> <input type="text" name="username2" size="15"> <br> </p> <p align="left"><strong>Enter password: </strong> <input type="password" name="password2" size="15"> </p> <p align="center"> <input type="button" value="Submit" onClick="submitentry()"> </p> </form> 1. How to protect a HTML file to avoid to run it from other URL? (then I would encrypt the HTML) 2. How to avoid to run the rest of HTML code if a URL/picture is not found? |