This file contains hidden or 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
<? | |
$table = json_decode(file_get_contents('emoji.json')); | |
//print_r($table); //take a peak | |
foreach ($table as $k => $emoji) | |
foreach ($emoji->short_names as $shortname) | |
echo "'{$shortname}' => '{$emoji->unified}', \n"; | |
?> |
This file contains hidden or 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
<? | |
$emoji_unicode = array( | |
'copyright' => '00A9', | |
'registered' => '00AE', | |
'bangbang' => '203C', | |
//...etc. | |
} | |
?> |
This file contains hidden or 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
<? | |
require('emoji_unicode.php'); | |
$text = "hello :world_map: . it's :hammer: :stopwatch:."; | |
//alphanumeric, hyphens, plus-signs, and underscores string, wrapped in colons | |
preg_match_all("/:([a-zA-Z0-9'_+-]+):/", $text, $emojis); | |
foreach ($emojis[1] as $emojiname) | |
if (isset($emoji_unicode[$emojiname])) |
This file contains hidden or 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
#bookshelf { | |
width:156px; | |
margin: 0 auto; | |
} | |
.book { | |
-webkit-filter: grayscale(1); | |
-webkit-filter: grayscale(100%); | |
filter: grayscale(100%); | |
filter: gray; | |
background-size:cover; |
This file contains hidden or 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
<? | |
$curl_options = array( | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_HEADER =>; false, | |
CURLOPT_FOLLOWLOCATION => false, | |
CURLOPT_ENCODING => "", | |
CURLOPT_AUTOREFERER => true, | |
CURLOPT_CONNECTTIMEOUT => 8, | |
CURLOPT_TIMEOUT => 8, | |
CURLOPT_MAXREDIRS => 3, |
This file contains hidden or 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
<? | |
// read cache and convert XML to ARRAY | |
$data_cache = explode($breaker,file_get_contents($cache)); | |
$reading = new SimpleXMLElement($data_cache[0]); | |
$read = new SimpleXMLElement($data_cache[1]); | |
echo "<div id='bookshelf'>"; | |
// cycle through currently reading (@TODO i dont know if cycle works nativily, only developed with 1 book in shelf. sometimes they change the xml structure when >1. would need to change) | |
foreach ($reading->reviews->review as $reading) |
This file contains hidden or 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
ErrorDocument 404 /index.php |
This file contains hidden or 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
<? | |
ob_end_flush(); | |
for( $i = 0 ; $i < 10 ; $i++ ) { | |
echo $i; | |
flush(); | |
ob_flush(); | |
sleep(1); | |
} | |
?> |
This file contains hidden or 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
<? | |
@ini_set('zlib.output_compression',0); | |
@ini_set('implicit_flush',1); | |
@ob_end_clean(); | |
set_time_limit(0); | |
header( 'Content-type: text/html; charset=utf-8' ); | |
ob_implicit_flush(1); | |
for($i=0; $i<10; $i++){ | |
echo $i; |
OlderNewer