摘要:
function change() { $pdf_file = './pdf/demo.pdf'; $save_to = './jpg/demo.jpg'; //make sure that apache has permissions to write in this folder! (common problem)//execute ImageMagick command 'co... 阅读全文
posted @ 2017-06-06 18:00
泪滴
阅读(165)
评论(0)
推荐(0)
摘要:
function qr_code($data, $type = "TXT", $size = '150', $ec = 'L', $margin = '0') { $types = array("URL" => "http://", "TEL" => "TEL:", "TXT" => "", "EMAIL" => "MAILTO:"); if ( 阅读全文
posted @ 2017-06-06 17:59
泪滴
阅读(145)
评论(0)
推荐(0)
摘要:
function Delete($path) { if (is_dir($path) === true) { $files = array_diff(scandir($path), array('.', '..')); foreach ($files as $file) { Delete(realpath($path) . '/' . $file); } ... 阅读全文
posted @ 2017-06-06 17:29
泪滴
阅读(119)
评论(0)
推荐(0)
摘要:
function secsToStr($secs) { if ($secs >= 86400) { $days = floor($secs / 86400); $secs = $secs % 86400; $r = $days . ' day'; if ($days 1) { $r .= 's'; }if ($secs > 0) { ... 阅读全文
posted @ 2017-06-06 17:26
泪滴
阅读(327)
评论(0)
推荐(0)
摘要:
function deny() { if (!file_exists('blocked_ips.txt')) { $deny_ips = array( '127.0.0.1', '192.168.1.1', '83.76.27.9', '192.168.1.163' ); } else { $deny_ips = f... 阅读全文
posted @ 2017-06-06 17:23
泪滴
阅读(215)
评论(0)
推荐(0)
摘要:
function makeClickableLinks($text) { $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)', '\1', $text); $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)'... 阅读全文
posted @ 2017-06-06 17:22
泪滴
阅读(187)
评论(0)
推荐(0)
摘要:
function is_validemail($email) { $check = 0; if (filter_var($email, FILTER_VALIDATE_EMAIL)) { $check = 1; } return $check; } 阅读全文
posted @ 2017-06-06 17:21
泪滴
阅读(127)
评论(0)
推荐(0)
摘要:
function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from pro... 阅读全文
posted @ 2017-06-06 17:21
泪滴
阅读(117)
评论(0)
推荐(0)
摘要:
function display_sourcecode($url) { $lines = file($url); $output = ""; foreach ($lines as $line_num => $line) { // loop thru each line and prepend line numbers $output .= "Line #{$line_... 阅读全文
posted @ 2017-06-06 17:20
泪滴
阅读(191)
评论(0)
推荐(0)
摘要:
function detect_city($ip) { $default = 'UNKNOWN'; $curlopt_useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)'; $url = 'ht... 阅读全文
posted @ 2017-06-06 17:19
泪滴
阅读(131)
评论(0)
推荐(0)
摘要:
function clean($input) { if (is_array($input)) { foreach ($input as $key => $val) { $output[$key] = clean($val); // $output[$key] = $this->clean($val); } } else { $output ... 阅读全文
posted @ 2017-06-06 17:17
泪滴
阅读(134)
评论(0)
推荐(0)
浙公网安备 33010602011771号