php 948

#PHP
验证邮箱地址是否有效的PHP代码

有时候,当在网站填写表单,用户可能会输入错误的邮箱地址,这个函数可以验证邮箱地址是否有效。 function is_validemail($email) { $check = 0;…

2015-08-09 150

#PHP
使用使用 imagebrick将pdf转成图片

<?php $pdf_file = './pdf/demo.pdf'; $save_to = './jpg/demo.jpg'; //make sure that apach…

2015-08-09 560

#PHP
whois 查询的PHP代码

使用下面的函数可以获取任何域名用户的完整细节 function whois_query($domain) { // fix the domain name: $domain = s…

2015-08-09 520

#PHP
PHP把文本转换成图片

<?php header("Content-type: image/png"); $string = $_GET['text']; $im = image…

2015-08-09 891

#PHP
PHP提取任意图片的主颜色

function dominant_color($image) { $i = imagecreatefromjpeg($image); for ($x=0;$x<images…

2015-08-09 746

#PHP
PHP获取远程文件的大小

function remote_filesize($url, $user = "", $pw = "") { ob_start(); $ch…

2015-08-09 478

#PHP
可以获取任意 Web 页面HTML 代码的PHP函数

function display_sourcecode($url) { $lines = file($url); $output = ""; foreach (…

2015-08-09 261

#PHP
PHP限制文件下载的速度

<?php // local file that should be send to the client $local_file = 'test-file.zip'; //…

2015-08-09 524

#PHP
从 PHP 数据创建 CSV 文件

function generateCsv($data, $delimiter = ',', $enclosure = '"') { $handle = fopen('ph…

2015-08-09 177

#PHP
使用IP判断访问用户是在哪个城市的PHP代码

function detect_city($ip) { $default = 'UNKNOWN'; $curlopt_useragent = 'Mozilla/5.0 (Windo…

2015-08-09 946

#PHP
PHP计算两个经纬度之间的距离

function getDistanceBetweenPointsNew($latitude1, $longitude1, $latitude2, $longitude2) { $…

2015-08-09 692

#PHP
php生成验证码与验证码验证完整实例

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://…

2015-08-05 632
1 23 24 25 26 27 79