php 模仿用户登陆读取DZ 论坛验码程序

 更新时间:2016年11月25日 16:29  点击:1624

error_reporting(0);
session_start();
require("config.php");
if(!is_dir("temp"))
{
 mkdir("temp",0777);
}
$c=tempnam("temp","c");
$url=DZ."logging.php?action=login";
 $ch=curl_init();
 curl_setopt($ch,CURLOPT_URL,$url);
 curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]);
 curl_setopt($ch,CURLOPT_COOKIEJAR,$c);
 curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
 $html=curl_exec($ch);
 preg_match("/(?<=charset=).*?(?=")/",$html,$charset);
 if($charset[0]!=="utf-8")
 {
  $html=iconv($charset[0],"utf-8",$html);
 }
 curl_close($ch);
 preg_match("/(?<=formhash" value=").*?(?=")/",$html,$outs);
 $_SESSION["hash"]=$outs[0];
 

$c1=tempnam("temp","c1");
$re_url=DZ."ajax.php?action=updateseccode&secchecktype=&inajax=1&ajaxtarget=seccodeverify_menu";
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$re_url);
curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_COOKIEFILE,$c);
curl_setopt($ch,CURLOPT_COOKIEJAR,$c1);
$html=curl_exec($ch);
curl_close($ch);
preg_match("/(?<=src=").*?(?=")/",$html,$outs);

$_SESSION["cookie_jar"]=tempnam("temp","C1_");
$url=DZ.$outs[0];
$ch=curl_init();
curl_setopt($ch,CURLOPT_REFERER,$re_url);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_COOKIEFILE,$c1);
curl_setopt($ch,CURLOPT_COOKIEJAR,$_SESSION["cookie_jar"]);
$html=curl_exec($ch);
curl_close($ch);
echo $html;

error_reporting(0);
session_start();
header("Content-Type:text/html;charset=utf-8");
require("config.php");
$_SESSION["cookie_jar1"]=tempnam("temp","C2");
$url=DZ."ajax.php?inajax=1&action=checkseccode&seccodeverify=".$_GET["code"];
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_COOKIEFILE,$_SESSION["cookie_jar"]);
curl_setopt($ch,CURLOPT_COOKIEJAR,$_SESSION["cookie_jar1"]);
$html=curl_exec($ch);
preg_match("/(?<=encoding=").*?(?=")/",$html,$charset);
if($charset[0]!=="utf-8")
{
 $html=iconv($charset[0],"utf-8",$html);
}
curl_close($ch);
preg_match("/(?<=CDATA[).*?(?=])/",$html,$outs);
echo $outs[0];
?>

ExcelFileParser处理excel获得数据 可作批量导入到数据库

提交表单

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Excel数据获取演示</title>
<meta name="Keywords" content="TODO" />
<meta name="Description" content="TODO"/>
</head>
<body>
    <div>
      <div>Excel数据获取演示</div>
      <div>
        <form method="POST" action="/Index/parse" enctype="multipart/form-data">
            <input type="file" name="excel" value="" />
            <input type="submit" name="submit" value="提交" />
        </form>
      </div>
    </div>
</body>
</html>


提交处理
[php]
<?php
/**
* CopyRight (c) 2009,
* All rights reserved.
* 文件名:
* 摘  要:
*
* @author 星期八 ixqbar@hotmail.com
* @version
*/

class IndexAction extends Action
{
    /**
     * 构造函数
     */
    public function __construct()
    {
        parent::__construct();
    }
    /**
     * 默认索引页
     */
    public function index()
    {
        $this->display();
    }
    /**
     * 提交处理
     */
    public function parse()
    {
       /**
        * $_FILES数组说明
        * array(n) {
        *   ["表单文件框名称"] => array(5) {
        *       ["name"]        => 提交文件名称
        *       ["type"]        => 提交文件类型 Excel为"application/vnd.ms-excel"
        *       ["tmp_name"]    => 临时文件名称
        *       ["error"]       => 错误(0成功1文件太大超过upload_max_filesize2文件太大超过MAX_FILE3上传不完整4没有上传文件)
        *       ["size"]        => 文件大小(单位:KB)
        *   }
        * }
        */
        $return=array(0,'');
        /**
         * 判断是否提交
         * is_uploaded_file(文件名称)用于确定指定的文件是否使用POST方法上传,防止非法提交,通常和move_upload_file一起使用保存上传文件到指定的路径
         */
        if(!isset($_FILES) || !is_uploaded_file($_FILES['excel']['tmp_name']))
        {
            $return=array(1,'提交不合法');
        }
        //处理
        if(0 == $return[0])
        {
            import('@.Util.ExcelParser');
            $excel=new ExcelParser($_FILES['excel']['tmp_name']);
            $return=$excel->main();
        }
        //输出处理
        print_r($return);
    }
}
?>
[/php]

处理类
[php]
<?php
/**
* CopyRight (c) 2009,
* All rights reserved.
* 文件名:excel数据获取
* 摘  要:
*
* @author 星期八 ixqbar@hotmail.com
* @version 0.1
*/
class ExcelParser
{
    private $_data=array(0,'');
    private $_excel_handle;
    private $_excel=array();
    /**
     * 构造函数
     * @param <string> $filename 上传文件临时文件名称
     */
    public function __construct($filename)
    {
        /**
         * 引入excelparser类
         * 普通方法为
         * requires 路径.'excelparser.php';
         * import为ThinkPHP自带导入类方法
         */
        import('@.Util.PHPExcelParser.excelparser','','.php');
        $this->_excel_handle=new ExcelFileParser();
        //错误获取
        $this->checkErrors($filename);
    }
    /**
     * 错误校验
     */
    private function checkErrors($filename)
    {
        /**
         * 方法一
         */
        $error_code=$this->_excel_handle->ParseFromFile($filename);
        /**
         * 方法二
         * $file_handle = fopen($this->_filename,'rb');
         * $content = fread($file_handle,filesize($this->_filename));
         * fclose($file_handle);
         * $error_code = $this->_excel->ParseFromString($content);
         * unset($content,$file_handle);
         */
        switch($error_code)
        {
            case 0:
                //无错误不处理
                break;
            case 1:
                $this->_data=array(1,'文件读取错误(Linux注意读写权限)');
                break;
            case 2:
                $this->_data=array(1,'文件太小');
                break;
            case 3:
                $this->_data=array(1,'读取Excel表头失败');
                break;
            case 4:
                $this->_data=array(1,'文件读取错误');
                break;
            case 5:
                $this->_data=array(1,'文件可能为空');
                break;
            case 6:
                $this->_data=array(1,'文件不完整');
                break;
            case 7:
                $this->_data=array(1,'读取数据错误');
                break;
            case 8:
                $this->_data=array(1,'版本错误');
                break;
        }
        unset($error_code);
    }
    /**
     * Excel信息获取
     */
    private function getExcelInfo()
    {
        if(1==$this->_data[0])return;
        /**
         * 获得sheet数量
         * 获得sheet单元对应的行和列
         */
        $this->_excel['sheet_number']=count($this->_excel_handle->worksheet['name']);
        for($i=0;$i<$this->_excel['sheet_number'];$i++)
        {
            /**
             * 行于列
             * 注意:从0开始计数
             */
            $row=$this->_excel_handle->worksheet['data'][$i]['max_row'];
            $col=$this->_excel_handle->worksheet['data'][$i]['max_col'];
            $this->_excel['row_number'][$i]=($row==NULL)?0:++$row;
            $this->_excel['col_number'][$i]=($col==NULL)?0:++$col;
            unset($row,$col);
        }
    }
    /**
     * 中文处理函数
     * @return <string>
     */
    private function uc2html($str)
    {
        $ret = '';
        for( $i=0; $i<strlen($str)/2; $i++ )
        {
            $charcode = ord($str[$i*2])+256*ord($str[$i*2+1]);
            $ret .= '&#'.$charcode.';';
        }
        return mb_convert_encoding($ret,'UTF-8','HTML-ENTITIES');
    }
    /**
     * Excel数据获取
     */
    private function getExcelData()
    {
        if(1==$this->_data[0])return;

        //修改标记
        $this->_data[0]=1;
        //获取数据
        for($i=0;$i<$this->_excel['sheet_number'];$i++)
        {
            /**
             * 对行循环
             */
            for($j=0;$j<$this->_excel['row_number'][$i];$j++)
            {
                /**
                 * 对列循环
                 */
                for($k=0;$k<$this->_excel['col_number'][$i];$k++)
                {
                    /**
                     * array(4) {
                     *   ["type"]   => 类型 [0字符类型1整数2浮点数3日期]
                     *   ["font"]   => 字体
                     *   ["data"]   => 数据
                     *   ...
                     * }
                     */
                    $data=$this->_excel_handle->worksheet['data'][$i]['cell'][$j][$k];
                    switch($data['type'])
                    {
                        case 0:
                            //字符类型
                            if($this->_excel_handle->sst['unicode'][$data['data']])
                            {
                                //中文处理
                                $data['data'] = $this->uc2html($this->_excel_handle->sst['data'][$data['data']]);
                            }
                            else
                            {
                                $data['data'] = $this->_excel_handle->sst['data'][$data['data']];
                            }
                            break;
                        case 1:
                            //整数
                            //TODO
                            break;
                        case 2:
                            //浮点数
                            //TODO
                            break;
                        case 3:
                            //日期
                            //TODO
                            break;
                    }
                    $this->_data[1][$i][$j][$k]=$data['data'];
                    unset($data);
                }
            }
        }
    }
    /**
     * 主函数
     * @return <array> array(标识符,内容s)
     */
    public function main()
    {
        //Excel信息获取
        $this->getExcelInfo();
        //Excel数据获取
        $this->getExcelData();
        return $this->_data;
    }
}

?>

PHP生成扭曲有角度支持中文的图片验证码函数

<?php
function make_rand($length="32"){//验证码文字生成函数
$str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$result="";
for($i=0;$i<$length;$i++){
$num[$i]=rand(0,61);
$result.=$str[$num[$i]];
}
return $result;
}
$checkcode = make_rand(5);
$im_x=160;
$im_y=32;
function make_crand($length="5") {
$string = '';
for($i=0;$i<$length;$i++) {
$string .= chr(rand(0xB0,0xF7)).chr(rand(0xA1,0xFE));
}
return $string;
}
function getAuthImage($text , $im_x = 230 , $im_y = 32) {
$im = imagecreatetruecolor($im_x,$im_y);
$text_c = ImageColorAllocate($im, mt_rand(0,100),mt_rand(0,100),mt_rand(0,100));
$tmpC0=mt_rand(100,255);
$tmpC1=mt_rand(100,255);
$tmpC2=mt_rand(100,255);
$buttum_c = ImageColorAllocate($im,$tmpC0,$tmpC1,$tmpC2);
imagefill($im, 16, 13, $buttum_c);
//echo $text;
$font = 'c:\WINDOWS\Fonts\simsun.ttc';
//echo strlen($text);

$text=iconv("gb2312","UTF-8",$text);
//echo mb_strlen($text,"UTF-8");
for ($i=0;$i<mb_strlen($text);$i++)
{
$tmp =mb_substr($text,$i,1,"UTF-8");
$array = array(-1,0,1);
$p = array_rand($array);
$an = $array[$p]*mt_rand(1,9);//角度
$size = 20;
imagettftext($im,$size,$an,10+$i*$size*2,25,$text_c,$font,$tmp);
}

$distortion_im = imagecreatetruecolor ($im_x, $im_y);
imagefill($distortion_im, 16, 13, $buttum_c);
for ( $i=0; $i<$im_x; $i++) {
for ( $j=0; $j<$im_y; $j++) {
$rgb = imagecolorat($im, $i , $j);
if( (int)($i+20+sin($j/$im_y*2*M_PI)*10) <= imagesx($distortion_im) && (int)($i+20+sin($j/$im_y*2*M_PI)*10) >=0 ) {
imagesetpixel ($distortion_im, (int)($i+10+sin($j/$im_y*2*M_PI-M_PI*0.5)*3) , $j , $rgb);
}
}
}
//加入干扰象素;
$count = 600;//干扰像素的数量
for($i=0; $i<$count; $i++){
$randcolor = ImageColorallocate($distortion_im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
imagesetpixel($distortion_im, mt_rand()%$im_x , mt_rand()%$im_y , $randcolor);
}

$line_c=5;
//imageline
for($i=0; $i < $line_c; $i++) {
$linecolor = imagecolorallocate($distortion_im, 17, 158, 20);
$lefty = mt_rand(1, $im_x-1);
$righty = mt_rand(1, $im_y-1);
imageline($distortion_im, 0, $lefty, imagesx($distortion_im), $righty, $linecolor);
}

Header("Content-type: image/PNG");

//以PNG格式将图像输出到浏览器或文件;
//ImagePNG($im);
ImagePNG($distortion_im);

//销毁一图像,释放与image关联的内存;
ImageDestroy($distortion_im);
ImageDestroy($im);
}

getAuthImage(make_crand(5));

?>

php实现多线程
服务器发送多个请求要实现多进程要方便很多。只能使用在cli模式。可以用在特殊场合,如邮件发送任务等。
资源的共享访问使用了文件锁,并不是很可靠,主要是为了能够在Windwos下使用,如果确实有必要可以考虑自己改用相应的信号灯机制(这个扩展只能用于xUNIX)。

实例
[php]
define('DIR_PHP_EXEC', 'php');
define('DIR_MAIN_EXEC', __FILE__);
define('DIR_TMP', '/tmp');
require_once('my_process.php');

class pp extends my_process_base {
    public function run($param = null) {
        for ($i = 0; $i < 4; $i++) {
            echo "111 $paramn";
            sleep(1);
        }
    }
}

init_my_process();
$obj = $GLOBALS['gal_obj_process_m'];
if ($obj->is_main()) {
    $obj->run_task('pp', 'a');
    $obj->run_task('pp', 'b');
    $obj->run_task('pp', 'c');
    $obj->run_task('pp', 'd');
    //$obj->run_task('pp', 'b');
    $obj->set_max_run(10);
    $obj->run();
}

[/php]

进程管理类
[php]
/**
* @copyright 2007 movivi
* @author  徐智  <xzfred@gmail.com>
*
* $Id: getPage.php 11 2007-09-21 02:15:01Z fred $
*/
if (!defined('DIR_PHP_EXEC')) define('DIR_PHP_EXEC', 'php');
//if (!defined('DIR_MAIN_EXEC')) define('DIR_MAIN_EXEC', '');
if (!defined('DIR_TMP')) define('DIR_TMP', '');
/*****************************************************************************/
/* 初始化 */
define('CMD_MAIN_PROCESS_KEY', 'main_process_key');
define('CMD_CHILD_PROCESS_NAME', 'child_process_name');
define('CMD_CHILD_PROCESS_PARAM', 'child_process_param');

function init_my_process() {
    $GLOBALS['gal_obj_cmd'] = new my_cmd_argv();
    $key = $GLOBALS['gal_obj_cmd']->get_value(CMD_MAIN_PROCESS_KEY);
    $key = $key === false ? '' : $key;
    $GLOBALS['gal_obj_process_m'] = new my_process_m($key);
    if (!$GLOBALS['gal_obj_process_m']->is_main()) $GLOBALS['gal_obj_process_m']->run() ;
}

/**
* php多进程类
*
* 你需要从这个对象继承,然后实现你自己的run处理
*/
abstract class my_process_base {
    public function __construct($auto_run=true, $name='') {
    }

    public function __destruct() {
        echo "@endn";
    }

    abstract public function run($param = null);
}


class my_cmd_argv {
    private $cmd_argv = array();
    public function __construct() {
        $argv = $_SERVER['argv'];
        for ($i = 1; $i < count($argv); $i++) {
            $cmd = explode('=', $argv[$i]);
            $this->cmd_argv[$cmd[0]] = isset($cmd[1]) ? $cmd[1] : '';
        }
    }

    public function get_key($key) {
        return isset($this->cmd_argv[$key]);
    }

    public function get_value($key) {
        return isset($this->cmd_argv[$key]) ? $this->cmd_argv[$key] : false;
    }
}

/**
* php多进程管理类
* 可以在PHP中实现多进程处理,只限在控制台方式使用
* 当前的信号实现机制采用文件方式
*
*/
class my_process_m {
    /**
     * @var array $task_list
     * 进程列表
     */
    private $task_list = array();
    private $lock_list = array();
    private $lock = null;
    private $is_main = false;
    private $max_run = 3600000;

    private function release_lock($key = null) {
        $lock = &$this->lock_list;
        if (!is_null($key)) {
            $key = md5($this->build_lock_id($key));
            if (isset($lock[$key])) {
                if (is_resource($lock[$key][0])) fclose($lock[$key][0]);
                unlink($lock[$key][1]);
                unset($lock[$key]);
            }
            return true;
        }

        foreach ($lock as $k => $h) {
            if (is_resource($h)) fclose($h);
            unset($lock[$k]);
        }
        return true;
    }

    private function release_task($key = null) {
        $task = &$this->task_list;
        if (!is_null($key) && isset($task[$key])) {
            if (is_resource($task[$key])) pclose($task[$key]);
            unset($task[$key]);
        } else {
            foreach ($task as $k => $h) {
                if (is_resource($h)) pclose($h);
                unset($task[$k]);
            }
        }
        return true;
    }
           
    private function build_lock_id($key) {
        return DIR_TMP . DIRECTORY_SEPARATOR . $key . '_sem.lock';
    }

    protected function run_child_process() {
        $class = $GLOBALS['gal_obj_cmd']->get_value(CMD_CHILD_PROCESS_NAME);
        $param = $GLOBALS['gal_obj_cmd']->get_value(CMD_CHILD_PROCESS_PARAM);
        $param = $param == '' ? null : unserialize(base64_decode(trim($param)));
        $obj = new $class();
        $obj->run($param);
        $this->task_list[] = $obj;
    }

    public function __construct($lock='') {
        if ($lock === '') {
            $this->is_main = true;
            $key = md5(uniqid()) . '_main.my_process';
            $lock = array($key, $this->get($key));
        } else {
            $this->is_main = false;
            $lock = array($lock, 0);
        }
        $this->lock = $lock;
    }

    public function __destruct() {
        $this->release_lock();
        $this->release_task();
    }

    /**
     * 停止所有进程
     *
     */
    public function stop_all() {
    }

    /**
     * 是否是主进程
     *
     */
    public function is_main() {
        return $this->is_main;
    }

    /**
     * 是不是已经存在一个活动信号
     *
     * @param   string      $key
     * @return  bool       
     */
    public function exist($key) {
        return file_exists($this->build_lock_id($key));
    }

    /**
     * 获取一个信号
     *
     * @param   string      $key    
     * @param   int         $max_acquire    最大请求阻塞数量
     * @return mix 如果成功返回一个信号ID
     *
     */
    public function get($key, $max_acquire=5) {
        $fn = $this->build_lock_id($key);
        if (isset($this->lock_list[md5($fn)])) return false;
        $id = fopen($fn, 'a+');
        if ($id) $this->lock_list[md5($fn)] = array($id, $fn);
        return $id;
    }

    /**
     * 释放一个信号
     *
     * @param   string      $key    
     * @return  bool        如果成功返回一个信号true
     *
     */
    public function remove($key) {
        return $this->release_lock($key);
    }

    /**
     * 获取一个信号
     *
     * @param string    $id         信号ID
     * @param bool      $block      是否阻塞
     */
    public function acquire($id, $block=false) {
        if ($block) {
            return flock($id, LOCK_EX);
        } else {
            return flock($id, LOCK_EX + LOCK_NB);
        }
    }

    /**
     * 释放一个信号
     *
     */
    public function release($id) {
        flock($id, LOCK_UN);
    }
    public function run_task($process_name, $param=null) {
        $this->task_list[] = popen(DIR_PHP_EXEC . ' -f ' . DIR_MAIN_EXEC . ' -- '
            . CMD_CHILD_PROCESS_NAME . '=' . $process_name . ' '
            . CMD_CHILD_PROCESS_PARAM . '="' . base64_encode(serialize($param)) . '" '
            . CMD_MAIN_PROCESS_KEY . '="' . $this->lock[0] . '" ',
            'r');
    }

    public function run($auto_run = true) {
        if ($this->is_main) {
            $ps = &$this->task_list;
            $max_run = &$this->max_run;
            $id = 0;
            do {
                //echo "process----------------------------------------: n";
                $c = 0;
                foreach ($ps as $k => $h) {
                    $c++;
                    $msg = fread($h, 8000);
                    if (substr($msg, -5, 4) === '@end') {
                        echo "end process:[$k][$id] echo n{$msg} n";
                        $this->release_task($k);
                    } else {
                        echo "process:[$k][$id] echo n{$msg} n";
                    }
                }
                sleep(1);
            } while ($auto_run && $id++ < $max_run && $c > 0);
        } else {
            $this->run_child_process();
        }
    }

    public function set_max_run($max=1000) {
        $this->max_run = $max;
    }
}

[!--infotagslink--]

相关文章

  • C#开发Windows窗体应用程序的简单操作步骤

    这篇文章主要介绍了C#开发Windows窗体应用程序的简单操作步骤,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-04-12
  • php 获取用户IP与IE信息程序

    php 获取用户IP与IE信息程序 function onlineip() { global $_SERVER; if(getenv('HTTP_CLIENT_IP')) { $onlineip = getenv('HTTP_CLIENT_IP');...2016-11-25
  • C++调用C#的DLL程序实现方法

    本文通过例子,讲述了C++调用C#的DLL程序的方法,作出了以下总结,下面就让我们一起来学习吧。...2020-06-25
  • C#使用Process类调用外部exe程序

    本文通过两个示例讲解了一下Process类调用外部应用程序的基本用法,并简单讲解了StartInfo属性,有需要的朋友可以参考一下。...2020-06-25
  • 微信小程序 页面传值详解

    这篇文章主要介绍了微信小程序 页面传值详解的相关资料,需要的朋友可以参考下...2017-03-13
  • php简单用户登陆程序代码

    php简单用户登陆程序代码 这些教程很对初学者来讲是很有用的哦,这款就下面这一点点代码了哦。 <center> <p>&nbsp;</p> <p>&nbsp;</p> <form name="form1...2016-11-25
  • 使用GruntJS构建Web程序之构建篇

    大概有如下步骤 新建项目Bejs 新建文件package.json 新建文件Gruntfile.js 命令行执行grunt任务 一、新建项目Bejs源码放在src下,该目录有两个js文件,selector.js和ajax.js。编译后代码放在dest,这个grunt会...2014-06-07
  • uniapp微信小程序:key失效的解决方法

    这篇文章主要介绍了uniapp微信小程序:key失效的解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-01-20
  • PHP常用的小程序代码段

    本文实例讲述了PHP常用的小程序代码段。分享给大家供大家参考,具体如下:1.计算两个时间的相差几天$startdate=strtotime("2009-12-09");$enddate=strtotime("2009-12-05");上面的php时间日期函数strtotime已经把字符串...2015-11-24
  • php根据用户语言跳转相应网页

    当来访者浏览器语言是中文就进入中文版面,国外的用户默认浏览器不是中文的就跳转英文页面。 <&#63;php $lan = substr(&#8194;$HTTP_ACCEPT_LANGUAGE,0,5); if ($lan == "zh-cn") print("<meta http-equiv='refresh' c...2015-11-08
  • 将c#编写的程序打包成应用程序的实现步骤分享(安装,卸载) 图文

    时常会写用c#一些程序,但如何将他们和photoshop一样的大型软件打成一个压缩包,以便于发布....2020-06-25
  • php有效防止同一用户多次登录

    【问题描述】:同一用户在同一时间多次登录如果不能检测出来,是危险的。因为,你无法知道是否有其他用户在登录你的账户。如何禁止同一用户多次登录呢? 【解决方案】 (1) 每次登录,身份认证成功后,重新产生一个session_id。 s...2015-11-24
  • 微信小程序 网络请求(GET请求)详解

    这篇文章主要介绍了微信小程序 网络请求(GET请求)详解的相关资料,需要的朋友可以参考下...2016-11-22
  • 微信小程序如何获取图片宽度与高度

    这篇文章主要给大家介绍了关于微信小程序如何获取图片宽度与高度的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-03-10
  • 微信小程序自定义tabbar组件

    这篇文章主要为大家详细介绍了微信小程序自定义tabbar组件,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2021-03-14
  • 微信小程序二维码生成工具 weapp-qrcode详解

    这篇文章主要介绍了微信小程序 二维码生成工具 weapp-qrcode详解,教大家如何在项目中引入weapp-qrcode.js文件,通过实例代码给大家介绍的非常详细,需要的朋友可以参考下...2021-10-23
  • js检测用户输入密码强度

    一个用Javascript检测用户输入密码强度的效果代码,以下代码主要是从以下四个方面检测用户输入的密码的强度的,有兴趣的朋友可以自己添加或修改成自己想要的形式! 1. 如果输入的密码位数少于5位,那么就判定为弱。 2. 如果...2015-10-23
  • Python爬取微信小程序通用方法代码实例详解

    这篇文章主要介绍了Python爬取微信小程序通用方法代码实例详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下...2020-09-29
  • 微信小程序(应用号)开发新闻客户端实例

    这篇文章主要介绍了微信小程序(应用号)开发新闻客户端实例的相关资料,需要的朋友可以参考下...2016-10-25
  • php ajax注册验证用户名是否存在代码

    这是注册程序是一款当用户输入完用户名是,就会自动去数据库中查询用户要注册的用户名是否己经被注册了,如果是返回提示否则提示可以注册。 conn.php文件 代...2016-11-25