PHP 生成随机数
function randomkeys($length)
{
$key='';
$pattern='123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
for($i=0;$i<$length;$i++)
{
$key .= $pattern{mt_rand(0,47)};
}
return $key;
}
echo randomkeys(20);
相关文档:
http://fw.qq.com/ipaddress返回类似:var IPData = new Array("61.51.71.183","","北京市","");
<?php
function get_ip_place(){
$ip=file_get_contents(http://fw.qq.com/ipaddress);
$ip=str_replace('"',' ',$ip);
$ip2=explode("(",$ip);
$a=substr($ip2[1],0,-2);
$b=explode(",",$a);
return&n ......
<?
$fp = fsockopen ("passport.baidu.com", 80,
$errno, $errstr, 30);
if (!$fp) {
echo "$errstr
($errno)<br>\n";
} else {
$msg="GET
/?login&username=lapiaotuan22&password=oyhz123456
HTTP/1.0\r\n";
$msg.="Host:passport.baidu.com \r\n&quo ......
<?php
/* ----------------------------------------------------------------------------
* Script Name: encrypt.php
* Creation Date: 2008-4-7 10:36
* Last Modified: 2008-4-12 16:00
* Author: meyu
* Copyright (c) 2007
* Purpose: 数字字符串简易加解密
* --------------------------------- ......