News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rudi's Blog:
Get torrent data with PHP
November 06, 2008 @ 13:50:39

This new post to Rudi's blog shows how, with the help of an external class you can use PHP to grab information from a torrent file.

To use this code you first need to include a file with the benc, bdec and hex2bin functions. To get the torrent data (like the announce url, the files etc) it is enough if we decode the content of the torrent. On the other hand, if we want to read the number of seeds, leechs and downloads, we must encode the info part of the torrent, encrypt it with the sha1 function and convert the result to lowercase.

He includes the code to make the decoding/encryption of the results a copy and paste away (once you have these functions to work from). He's even provided an example using the code that gets the information from a torrent on the Pirate Bay website.

1 comment voice your opinion now!
torrent data library class tutorial bdec hex2bin


AddedBytes.com:
Regular Expressions Cheat Sheet
September 15, 2006 @ 07:46:23

One of the more elusive concepts of programming can be working with regular expressions. Now, there's lots of places to learn them and to get a handle on what they can do (such as this book), but what if you don't need the full-blown reference and just want a quick and dirty reference source? AddedBytes.com is happy to be of service with their latest cheat sheet divided up into the different formats (anchors, character classes, assertions, escape characters, etc).

The Regular Expressions cheat sheet is designed to be printed on an A4 sheet of paper and live by a designer or developer's desk, to make life a bit easier. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size Regular Expressions cheat sheet.

This time, they've posted it in a few different formats, including a torrent file to make for faster/easier download. They still have the usual methods (PDF and PNG) but you'll need to visit the page for those links - it's been requested not to directly link to them.

0 comments voice your opinion now!
cheat sheet regular expression pdf png torrent cheat sheet regular expression pdf png torrent



Community Events





Don't see your event here?
Let us know!


unittest library threedevsandamaybe interview list api introduction configure framework bugfix wordpress language application install laravel developer community release series podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework