Simple YouTube API Class in PHP: Redeaux — Revision 2 (update)

Just a note: It’s not 100% done yet, still have a few minor tweaks. I’m going to be uploading the final version this Friday. I think there will be one more revision after this one, then we will launch the official first version. Thank you for all of your patient and feedback as we strive to make this the most popular PHP4/5 YouTube API on the internet.

A lot of you have read our post including our YouTube API. I know because it almost gets as much traffic as the post on how to hide everything on your myspace profile.

Now because of it’s popularity you guys have requested a lot of bug fixes and a new release — revision 2. On top of that a lot of you are still using PHP4, I have no idea why, but you are.

I decided to address every individual bug that you guys commented on the post, and address issues that I thought were relevant on top of your findings (which have been extremely helpful.)

This brings me to the NEW and IMPROVED YouTube API Class.

Here’s the current changelog

  • Page numbers are inaccurate, and don’t allow you to go to the last page because of numbering issues
    • This was caused by YouTube displaying x amount of videos per page, and us/you having a different number of results per page, for example compared to YouTube’s 20 results per page. So while there would be 3149 pages, there’s really not that many because you either have MORE videos per page than YouTube does, or you have way less, either way this has been fixed by dividing the total number of videos by the amount of videos you want per page.
  • Spaces in search result in internal error because no URL encoding was present.
    • You guys know the bug, you’d search for “big rocket” or “nice booty” and it would break because the space (%20 in url encoding) wasn’t getting encoded properly. This has been fixed.

There are more bugs that have been fixed, but those two were really most prominent in the sense that, they caused everything else to break.

Here’s the new feature list (these are supplemental features, none of the old functionality is gone, these are just added to it.)

  • Support for PHP4 (yes, that’s right.)
  • Support for curl_init() instead of the user of file_get_contents() (disabled on some shared hosts.)
  • Support for searching by video title (instead of tag.)
  • Support for retrieving video by id
  • Support for “method scaffolding” you can pass multiple things like video_id=this&tag=this&search=this, etc. It will return supplemental results.
  • Support for “naked display” displaying videos in a style-less layout so you can style it on your own.
  • Support for manual methoding. Use the manual_method() to write your own custom call and return the results, or errors, formatted inside of the HTML.
  • Support for “embed_only()” display. So you can create scripts to embed videos.

All of the support is in ONE class file. You don’t download a separate version if you’re using PHP4, or PHP5, it’s all the same thing and it detects it by itself.
…and a lot more.

I will be writing a full blown tutorial on how to get the most out of the YouTube API class on Friday so you guys can get to work, along with a zip and a rar.

I have an idea to allow you to get updates for it dynamically from WaxJelly’s dev server (sort of like a remote SVN.) but through PHP directly. Let me know what you think about that, in other words, you don’t have to patch it, we do it for you and you just turn the boolean on or off. It’s an idea, and a good one I think.

ALSO! We’re going to be putting this thing on DIGG FRIDAY! You guys better help us out and return some love by digging it (if you digg it, of course.) we’re not forcing anybody here, but the more people we get using it the better it’s going to get.

I’m also willing to accept your code and give you credit for it, so I’ll have more info on that this friday.

If you have any ideas boys, post them now, you’ve got 5 days and then I’m releasing this it. Let me know what you think.
Originally design by developers of WaxJelly
Download: External-1

Share This on Facebook, Myspace … etc These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MySpace
  • Technorati
  • Twitter

Tags: , , ,

This entry was posted on Wednesday, July 18th, 2007 at 23:22 and is filed under Download, Freebies, Tech.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

Leave a Reply

September Coupon Codes for Namecheap

September Coupon Codes for Namecheap. Save your money while getting yourself a new domain or just renewing the old one.

Share This on Facebook, Myspace ... etc These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MySpace
  • Technorati
  • Twitter

12 Bugs We’ve Found In iPhone OS 3.0

Multimedia messaging does not support sculpture, macrame, or interpretive dance.
Voice memo recordings totally don’t sound like me. I don’t sound like that, do I? Seriously?
Turned on adult content filter but everybody in my videos still has their clothes on.
Adding a task to calendar did not result in task getting done.
Clicked this blue “compass” icon but [...]

Share This on Facebook, Myspace ... etc These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MySpace
  • Technorati
  • Twitter

The Samsung Instinct (aka iPhone Hunter)

Despite what we and other media have hinted at, despite what Sprint itself is spending a lot of money trying to convey, the Samsung Instinct is not an iPhone killer. To be sure, Samsung and Sprint borrowed liberally from the iPhone playbook when it came to look and feel. But the comparison itself isn’t [...]

Share This on Facebook, Myspace ... etc These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MySpace
  • Technorati
  • Twitter

SanDisk Launches 16GB microSD and M2 Cards

Despite the fact the we never really fill up our masses of memory on our home PC’s we manage to do this very easily on our mobile devices. With most of us owning a least a mobile phone, camera and mp3/4 player that is either already full or nearing capacity this announcement comes as a [...]

Share This on Facebook, Myspace ... etc These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MySpace
  • Technorati
  • Twitter
Current Hot Topics in Houston