php sample code for social network