PHP – Get Facebook Comment Count for a Page

Here is a simple function to get the amount of comments a page has.  Simply pass the full URL of the page you want the comments for. function fb_comment_count($url) { $json = json_decode(file_get_contents(‘https://graph.facebook.com/?ids=’ . $url));…

View →

PHP Function: Get the YouTube Video Id from a YouTube URL

Here is how you can get the YouTube Video ID from a URL no matter how many extra parameters get passed along with it. function getYouTubeIdFromURL($url) { $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $args); return isset($args[‘v’])…

View →