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
Nov 06, 2008 @ 19: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.

tagged: torrent data library class tutorial bdec hex2bin

Link:

AddedBytes.com:
Regular Expressions Cheat Sheet
Sep 15, 2006 @ 12: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.

tagged: cheat sheet regular expression pdf png torrent cheat sheet regular expression pdf png torrent

Link:

AddedBytes.com:
Regular Expressions Cheat Sheet
Sep 15, 2006 @ 12: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.

tagged: cheat sheet regular expression pdf png torrent cheat sheet regular expression pdf png torrent

Link:


Trending Topics: