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 代码片段可以检测用户浏览器所使用的语言 function get_client_language($availableLanguages, $default='…
Mandrill 是一款强大的 SMTP 提供器。开发者倾向于使用一个第三方 SMTP provider 来获取更好的收件交付。 下面的函数中,你需要把 “Mandrill.php…