This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$testDir = dirname(__FILE__).'/test/'; | |
$startTime = microtime(true); | |
$touches = 0; | |
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($testDir)) as $filepath) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bjoerns URL Shortener</title> | |
<meta name="author" content="Bjoern Wagner"> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__.'/vendor/facebook/src/facebook.php'; | |
$app_id = '1234567890'; | |
$secret = '0123456789abcdef0123456789abcdef0123456789abcdef'; | |
$fb = new Facebook(array( | |
'appId' => $app_id, | |
'secret' => $secret, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fb = new Facebook(array('appId' => ..., 'secret' => ..., 'cookie' => true)); | |
$queries = array( | |
array('method' => 'GET', 'relative_url' => '/8882845892'), | |
array('method' => 'GET', 'relative_url' => '/67226614422'), | |
array('method' => 'GET', 'relative_url' => '/140959058191'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
$qb->add('where', 'x.date = :date') | |
->setParameter('date', new \DateTime('+2 days')); | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://some.server.com/injection/experiment.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$output .= $url . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app->get('/', function () use ($urls) { | |
$output = ''; | |
foreach ($urls as $url) { | |
$output .= $url; | |
} | |
return $output; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$urls = array('http://www.facebook.com', 'http://www.twitter.com', 'http://plus.google.com'); |
NewerOlder