return ['http_code' => $httpcode];
}
- public static function getHttpCodeComment($httpcode)
- {
- switch ($httpcode) {
- case 301:
- return " - Moved Permanently: the resource has a new permanent home — update your bookmarks or links.";
- case 302:
- return " - Found: tells the client to look at (browse to) another URL.";
- //case 307:
- //case 308:
- case 400:
- return " - Bad request: this and all future requests should be directed to the given URI.";
- }
- }
-
public static function youtubeVideoExist($videoID)
{
$headers = get_headers('https://www.youtube.com/oembed?format=json&url=http://www.youtube.com/watch?v=' . $videoID);