5kyy8lu3 Posted December 18, 2008 Share Posted December 18, 2008 I'm writing a photo hosting web application, kinda like photobucket, and I'd like an easy way for users to get the picture url saved to their clipboard. Is it possible to make a button that does this? Or would that require javascript? Thanks ahead of time. UPDATE: well i'm still googling my butt off, and I'm reading that javascript does it but firefox doesn't allow access to the clipboard, so flash is the only othe way (i think), so i guess i'll just have to make a form box with the value set to the url for the user to copy? and if that's my only option, is there a way to make the text already highlighted when the page loads? thanks. Link to comment https://forums.phpfreaks.com/topic/137542-copy-link-to-clipboard-on-click-possible/ Share on other sites More sharing options...
ILMV Posted December 18, 2008 Share Posted December 18, 2008 Well you certainly cannot do it with PHP, ad PHP is a server side language. You need to Google 'JavaScript clipboard', heres an example http://harriyott.com/2005/01/javascript-clipboard-control.aspx Link to comment https://forums.phpfreaks.com/topic/137542-copy-link-to-clipboard-on-click-possible/#findComment-718799 Share on other sites More sharing options...
dennismonsewicz Posted December 18, 2008 Share Posted December 18, 2008 what you are asking about provides a HUGE security risk with doing something like that. Any time you are implementing code that communicates action with a users personal machine such as copying to the clipboard, there are always security bugs involved. I wouldn't worry about this and allow the user to just copy and pastes and they please! Link to comment https://forums.phpfreaks.com/topic/137542-copy-link-to-clipboard-on-click-possible/#findComment-718810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.