Im looking for a function that will pull the youtube duration of a video from the url. I read some tutorials but don\'t get it. I embed videos on my site using a url and I have
You can simply use a time formater to change the seconds into whatever format you like. i.e. return gmdate("H:i:s", $obj->data->duration);