Jump to content
Geekforum.cz

Všechny filmy na jednom webu..


Kerol
 Share

Recommended Posts

A co pomocí API zjistit zda video ještě existuje nebo ne a případně ho odebrat z db?

Princip jednoduchý:

Tohle ti vrátí XML feed na video z youtube

http://gdata.youtube.com/feeds/api/videos/Bparw9Jo3dk

Pokud neexistuje, tak vrátí Video not found.

http://gdata.youtube.com/feeds/api/videos/FURd2SfS3yk

 

Takže stačí přes file_get_content nebo přes cURL vytáhnout obsah toho feedu a porovnat jestli se tam nachází Video not found nebo ne a smazat.

Edited by KennyDaren
Link to comment
Share on other sites

  • 11 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...