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
$('input[name=fotograf]').change(function(e){ | |
if (window.File && window.FileReader && window.FileList && window.Blob) { | |
var fotograf = e.target.files[0]; | |
var reader = new FileReader(); | |
reader.readAsDataURL(fotograf); | |
reader.onload = function(evt){ | |
$('#result').attr('src', evt.target.result); | |
} | |
} else { | |
alert('Tarayıcınızın önizleme desteği bulunmuyor.'); |
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 | |
// site url | |
$url = 'http://www.erbilen.net'; | |
// get data | |
$alexa = simplexml_load_file('http://data.alexa.com/data?cli=10&url='.$url); | |
// global rank | |
$globalRank = number_format( (int) $alexa->SD->POPULARITY['TEXT'] ); |
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 'class.upload.php'; | |
if ( isset( $_POST[ 'submit' ] ) ) { | |
$image = new Upload( $_FILES[ 'image' ] ); | |
if ( $image->uploaded ) { | |
// upload klasörüne değişiklik yapmadan kayıt et |
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
<form action="" method="post" enctype="multipart/form-data"> | |
Resim Seçin: <input type="file" name="image" /><hr /> | |
<input type="submit" name="submit" value="Yükle" /> | |
</form> |
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 'class.upload.php'; | |
if ( isset( $_POST[ 'submit' ] ) ) { | |
$image = new Upload( $_FILES[ 'image' ] ); | |
if ( $image->uploaded ) { | |
// resmi yeniden adlandıralım |
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 | |
// jpg resimlerin kalitesini ayarlamak için kullanılır | |
$image->jpeg_quality = 50; | |
// png resimlerin sıkıştırılma oranını belirlemek için kullanılır. 1-9 arası. Boyut artar ya da azalır orana göre. | |
$image->png_compression = 9; | |
// maksimum yüklenecek dosya boyutu belirlenir. 1024 = 1KB | |
$image->file_max_size = '1024'; |
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>Document</title> | |
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script src="jquery.timer.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 | |
/** | |
* @author Tayfun Erbilen | |
* @web http://www.erbilen.net | |
* @mail [email protected] | |
*/ | |
class googlePageSpeedTest { | |
// hedef site |
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
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
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 | |
$url = 'https://gist.github.com/what-ever'; | |
$domain = parse_url($url, PHP_URL_HOST); | |
echo $domain; // github.com |
OlderNewer