locking the table

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
sara933
Forum Newbie
Posts: 11
Joined: Thu May 15, 2008 10:01 am

locking the table

Post by sara933 »

hi friends
i have a table with some pics on it that its contents is updated every time it is reloaded .how can i lock this that when the user see it on the browser he/she can't change its width or .... and can't copy it to any other editors?
Regards
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: locking the table

Post by onion2k »

Locking the width of an HTML table is just a matter of giving it a specific width, and maybe using the nowrap attribute.

Stopping people copying the images is impossible. You can make it difficult by ofuscating the code, using background display with a transparent cover image, and loading the images via Javascript... but once the image is on the screen the user will always be able to capture it with their Printscreen key. Ultimately any attempt to secure your images will be futile. It's best to watermark them if they're really important.
sara933
Forum Newbie
Posts: 11
Joined: Thu May 15, 2008 10:01 am

Re: locking the table

Post by sara933 »

hi
it is no matter that user can save it. it is important that he can't for example copy and past the table in "word documents" .i wonder if there is any way to convert my table to an image and then show it to the user??
Regards
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: locking the table

Post by onion2k »

Converting to a single image is easy. Create a new image with GD (imagecreate() or imagecreatetruecolor() ), and use imagecopy() to copy all the images on to it. Then send it to the user with imagejpeg().
Post Reply