Examples of the code in php and java for public share