<?php function is_mobile(){ // returns true if one of the specified mobile browsers is …
<? // start at the top of the page since we start a session session_name('mysite_hit_co…
function dominant_color($image) { $i = imagecreatefromjpeg($image); for ($x=0;$x<images…
function remote_filesize($url, $user = "", $pw = "") { ob_start(); $ch…
function display_sourcecode($url) { $lines = file($url); $output = ""; foreach (…
<?php // local file that should be send to the client $local_file = 'test-file.zip'; //…
function generateCsv($data, $delimiter = ',', $enclosure = '"') { $handle = fopen('ph…
function detect_city($ip) { $default = 'UNKNOWN'; $curlopt_useragent = 'Mozilla/5.0 (Windo…
function getDistanceBetweenPointsNew($latitude1, $longitude1, $latitude2, $longitude2) { $…
function readCSV($csvFile){ $file_handle = fopen($csvFile, 'r'); while (!feof($file_handle…
SQL 注入或者 SQLi 常见的攻击网站的手段,使用下面的代码可以帮助你防止SQL注入 function clean($input) { if (is_array($input)…
function qr_code($data, $type = "TXT", $size ='150', $ec='L', $margin='0') { $ty…
php常用正则表达式,验证用户名,密码,Email,Url等