Next to the content on many web sites it is now commonplace to find options to share the content on bookmark sites or e-mail the content to friends. For example, such options occur beneath YouTube videos. I want to do the same on my web site. The problem is, I haven't the slightest clue as to how it's done. Can someone please give me a brief overview of how it can be done with PHP, just to kickstart my learning? Or, can someone please point me in the way of a script?
For social sharing you can use popular http://www.addthis.com/ for email to a friend feature you need to code. here is how would I do it. 1. have a link "email to friend" that will pop up simple form where user needs to enter friends email address and comment. 2. use jQuery and some popup plugin such as 'facebox' to open a form centered on page , will be pretty cool 3. use jQuery to call and ajax page with the params eg site.com/ajax/emailtofriend.php?mail=friend@gmail.com&comments=COMMENTS&id=id_of_yourcontentpage Code (markup): 4. emailtofriend.php will take all the data , use id_of_yourcontentpage to get the content form whereever you store it eg database, make a content form that data suitable for mail 5. use mail() function in php to send mail 6. display user with some info on page like "your friend will receive a mail in few minute . " 4.1. if its complicated for you to pull the content and generate it for email, you can just send a permanent link to the page from where the form was submitted