有时候,当在网站填写表单,用户可能会输入错误的邮箱地址,这个函数可以验证邮箱地址是否有效。 function is_validemail($email) { $check = 0;…
<?php $pdf_file = './pdf/demo.pdf'; $save_to = './jpg/demo.jpg'; //make sure that apach…
使用下面的函数可以获取任何域名用户的完整细节 function whois_query($domain) { // fix the domain name: $domain = s…
<?php header("Content-type: image/png"); $string = $_GET['text']; $im = image…
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) { $…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://…
php实现javascript中的escape和unescape函数