Skip to content

Instantly share code, notes, and snippets.

View xboston's full-sized avatar

Nikolay Kirsh xboston

View GitHub Profile
@xboston
xboston / gist:6130534
Created August 1, 2013 11:31
php torrent seed+leeches http udp
<?php
class Torrent
{
public function scrape(array $announce = [ ] , $hash_info = null)
{
$r = [
'seeders' => 0 ,
'leechers' => 0
<pre><?php
$di = new Phalcon\DI\FactoryDefault();
\Phalcon\Tag::getEscaperService();
$string = 'Русский';
Phalcon\Tag::setDefault("name", $string);
echo $string;
<?php
// -- test1 ---------
// throw Phalcon\Tag\Exception: A dependency injector container is required to obtain the "escaper" service
Phalcon\Tag::setDefault("name", "test");
echo Phalcon\Tag::getValue("name");
<?php
error_reporting( E_ALL | E_NOTICE | E_STRICT );
/**
* SQL for model:
CREATE TABLE `temp` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
*/