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 | |
$patterns = array( | |
'{title}' => '60: The Winds of Winter', | |
'{desc}' => 'Information for Episode 60: The Winds of Winter of Game of Thrones on HBO, featuring videos, images, synopsis and schedule.', | |
'{tags}' => 'HBO, Game of Thrones, Winter Is Coming, Clash of Kings George R.R. Martin', | |
'{image}' => 'http://i.lv3.hbo.com/assets/images/series/game-of-thrones/episodes/6/60/episode-60-1024.jpg', | |
'{source}' => 'http://www.hbo.com/game-of-thrones/episodes/6/60-60-the-winds-of-winter/index.html', | |
); | |
$imdbData = json_decode(file_get_contents('http://www.omdbapi.com/?i=tt0944947&plot=full&r=json'), true); | |
foreach ($imdbData as $key => $value) { |
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
function isImage($url = '') { | |
if (!strstr($url,'http')) return false; | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_NOBODY, 1); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_MAXREDIRS, 3); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
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
function remoteFileSize($url) { | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_NOBODY, 1); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_MAXREDIRS, 3); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,5); | |
curl_setopt($ch,CURLOPT_TIMEOUT, 15); |
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
function isLocation($url,$returnBaseUrl= false){ | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_NOBODY, 1); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_MAXREDIRS, 3); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,5); | |
curl_setopt($ch,CURLOPT_TIMEOUT, 15); |
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
$dl->debug(function ($type, $buffer) { | |
if (preg_match_all('/\[download\] (.*?)\% of (.*?)M/',$buffer,$match)) { | |
$perchant = (int)trim($match[1][0]); | |
if ($perchant > 0) { | |
echo $perchant . "<br>"; | |
} | |
} | |
}); |
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
http://blogsearch.google.co.th/ping/RPC2 | |
http://www.blogsearch.google.ru/ping/RPC2 | |
http://www.blogsearch.google.co.ve/ping/RPC2 | |
http://www.blogsearch.google.de/ping/RPC2 | |
http://www.blogsearch.google.gr/ping/RPC2 | |
http://www.blogpeople.net/ping | |
http://blogsearch.google.be/ping/RPC2 | |
http://xping.pubsub.com/ping/ | |
http://blogsearch.google.ae/ping/RPC2 | |
http://blogsearch.google.at/ping/RPC2 |
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
server bakımı | |
1 kullanılmayan veri tabanlarını sil | |
2 error logları sil | |
3 yüksek mailleri sil | |
4 tüm resimleri sıkıştır | |
5 kullanılmayan dosyaları temizle | |
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
sudo chgrp -R brew /usr/local/Cellar | |
sudo chgrp -R brew /usr/local/Homebrew | |
sudo chgrp -R brew /usr/local/var/homebrew | |
sudo chgrp -R brew ${HOME}/Library/Caches/Homebrew | |
sudo chgrp -R brew ${HOME}/Library/Logs/Homebrew | |
sudo chgrp -R brew /usr/local/etc | |
sudo chgrp -R brew /usr/local/opt | |
sudo chgrp -R brew /usr/local/bin | |
sudo chgrp -R brew /usr/local/var | |
sudo chgrp -R brew /usr/local/share/man/man1 |
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
$response = $next($request); | |
$buffer = $response->getContent(); | |
ini_set('zlib.output_compression', 'On'); // If you like to enable GZip, too! | |
$buffer = preg_replace('~<img(?!.*data-lazyno)[^>]*\K(?=src)~i', 'data-r', $buffer); | |
$response->setContent($buffer); | |
$buffer = $response->getContent(); | |
$buffer = preg_replace('~<iframe(?!.*data-lazyno)[^>]*\K(?=src)~i', 'data-r', $buffer); | |
$response->setContent($buffer); |
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
$this->info('--Aktarım Başladı-'); | |
$connectionName = 'old_mysql'; | |
$newDb = \DB::connection(''); | |
$oldDb = \DB::connection($connectionName); | |
$tmpOldTables = $oldDb->getDoctrineSchemaManager()->listTables(); | |
$tables = $newDb->getDoctrineSchemaManager()->listTables(); | |
$newTables = []; | |
$foreignKeys = []; | |
$indexes = []; |
OlderNewer