Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[PHP] YouTube video what-not r02

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Tue Nov 11, 2008 8:54 pm    Post subject: [PHP] YouTube video what-not r02 Reply with quote

So I've decided to post small bits and pieces of things I work on, just for fun.

Todo:
Database (SQL), search function, video player

Update 02:
Added URL and page method to get Video ID
Added "escapeshellcmd" before executing command wtih exec
Added extended video information
Added .gif encoder for the smaller thumbnails, requires GD library "GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu"

Fix:
Last second error

Update 01:
Added http_get method suggest by nog_lorp

This will get the video ID, "t" value needed for downloading a video, FLV and MP4 download links, and the YouTube thumbnail of the video.
The reason my post is so short, is because Firefox portable doesn't like flash.

The script also contains a video downloader by use of 'wget'. You can find compiled binaries all over the internet... but be warned, exec is dangerous!

In-browser sample:


Revision 02 (latest) here: http://forum.cheatengine.org/download.php?id=44589
Revision 01 here: http://forum.cheatengine.org/download.php?id=44805



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.


The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.



Last edited by compactwater on Sat Nov 15, 2008 3:58 pm; edited 5 times in total
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Tue Nov 11, 2008 9:16 pm    Post subject: Reply with quote

Looks pretty cool! Great job Smile
_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Nov 12, 2008 9:56 am    Post subject: Reply with quote

Heyy compactwater,

Nice to see you're in PHP as well Smile
Good job and welcome back.
Back to top
View user's profile Send private message
CRISISxCupid
I post too much
Reputation: 1

Joined: 09 Jun 2007
Posts: 2256

PostPosted: Thu Nov 13, 2008 11:32 am    Post subject: Reply with quote

Please make it for Veoh also.
_________________
Back to top
View user's profile Send private message
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Thu Nov 13, 2008 6:39 pm    Post subject: Reply with quote

iNcorrection wrote:
Please make it for Veoh also.
From what I know, Veoh bans IPs that download their videos from a source other than the site itself.
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Fri Nov 14, 2008 7:10 am    Post subject: Reply with quote

Use HTTP Referer header to fool them. (Header should be spelled "Referer" even though that is wrong, the RFC spec has it spelled wrong DSmile.

Also, use the PHP HTTP extension and use http_get. Then it is simple to set the HTTP Referer, and you can also use the onprogress option to update a progress bar. From there, although it isn't uber useful for youtube, I'd say implement multiple download streams for practice (use the resume option).

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Fri Nov 14, 2008 6:42 pm    Post subject: Reply with quote

nog_lorp wrote:
Use HTTP Referer header to fool them. (Header should be spelled "Referer" even though that is wrong, the RFC spec has it spelled wrong DSmile.

Also, use the PHP HTTP extension and use http_get. Then it is simple to set the HTTP Referer, and you can also use the onprogress option to update a progress bar. From there, although it isn't uber useful for youtube, I'd say implement multiple download streams for practice (use the resume option).
Thanks for the suggestion.
Added http_get method. Smile

"youtube01.php" is the latest version.

Also going to add more preg_match options to get extended information about the video (Description, author, views, etc.)
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Fri Nov 14, 2008 7:43 pm    Post subject: Reply with quote

Might also be easier (for the extended information) to use the YouTube Data API.

For example: http://gdata.youtube.com/feeds/api/videos/rLz1xyFMMCQ

Checkout http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Fri Nov 14, 2008 8:56 pm    Post subject: Reply with quote

nog_lorp wrote:
Might also be easier (for the extended information) to use the YouTube Data API.

For example: http://gdata.youtube.com/feeds/api/videos/rLz1xyFMMCQ

Checkout http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html
Ooo, XML.
I'll get onto implementing that.
...
Done.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites