Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hasnhasan's full-sized avatar
🎯
Focusing

Hasan hasnhasan

🎯
Focusing
View GitHub Profile
<?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) {
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);
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);
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);
$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>";
}
}
});
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
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
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
$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->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 = [];