if (!$_GET['id']) { $html = file_get_contents("http://grouphug.us/random"); } else { if (!is_numeric($_GET['id'])) die("Invalid ID"); $html = file_get_contents("http://grouphug.us/confessions/".$_GET['id']); } $html = str_replace("\n", "", $html); preg_match("/