-
php curl 抓取页面几种方法说明
[PHP教程] 2022-02-13 14:31:36 156人阅读
curl主要是抓取数据,当然我们可以用其他的方法来抓取,比如fsockopen,file_get_contents等,但是只能抓那些能直接访问的页面,如果要抓取有页面访问控制的页面,或者是登录以后的页面就比较困难了,是把PHP的主页取回放到...[详细]
-
php CURL伪造IP与来源实现程序
[PHP教程] 2022-02-13 14:30:49 54人阅读
伪造IP来源对于php来说是很简单的一件事情,我们只要利用了php curl即可实现伪造IP来源,IP地址你可以随便写. 1,php实例代码如下: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, http://localhost/2.php); curl_s...[详细]
-
PHP 无限分类完成程序
[PHP教程] 2022-02-13 14:30:19 166人阅读
1、数据库通过设置父类ID来进行唯一索引,然后使用函数的递归调用实现无限分类; 2、数据库设计通过特定格式进行排列,然后使用mysql查询关键函数:concat,程序实现比较简单,首先我们假设有这样的一个三级分类,新闻PHP...[详细]
-
php截取html字符串自动补齐html标签
[PHP教程] 2022-02-13 14:29:45 136人阅读
文章来总结一下关于利用php截取html字符串自动补全html标签,实际开发中会经常碰到,很多人直接先strip_tags过滤掉html标签,但是就只剩下纯文本了,可读性非常差,下面是一个函数,代码如下: /** * 截取HTML,并自动补全闭...[详细]
-
php里模拟POST提交数据两种方法
[PHP教程] 2022-02-13 14:29:26 130人阅读
下面总结了在php中有两种可以模仿用户进入登录或post数据的实现方法,对大家很有用,有需要的朋友可参考一下. 通过curl函数:PHP中的CURL函数库(Client URL Library Function) curl_close 关闭一个curl会话 curl_copy...[详细]
-
PHP无限级分类完成程序
[PHP教程] 2022-02-13 14:29:02 65人阅读
主要思路:首先看第三行和第四行,父类ID(PARENTID)的值是1,表示属于id=1这个类的子类,而一,二两行因为是一级分类,没有上级分类,所以父类ID(PARENTID)的值是0,表示初级分类,依次类推便实现了无限级分类,最终的效果...[详细]
-
php生成二维码完成代码
[PHP教程] 2022-02-13 14:28:26 110人阅读
二维码是二维条形码的一种,可以将网址、文字、照片等信息通过相应的编码算法编译成为一个方块形条码图案,手机用户可以通过摄像头和解码软件将相关信息重新解码并查看内容. php类库PHP QR Code 两句话解释:# 包含qrli...[详细]
-
php生成html静态页面的二种办法
[PHP教程] 2022-02-13 14:27:59 163人阅读
在我之前所见的文章中要不是用代码堆砌空间就是用高手与高手交流用的语言让新人望而生却,因此本文尽量把整体思路说得详尽点. 两种方法简单说明如下: 一,利用PHP的输出控制函数(Output Control)得到静态页面字符串,...[详细]
-
PHP运用memcache缓存技术简单介绍
[PHP教程] 2022-02-13 14:26:57 111人阅读
一个PHP利用memcache缓存技术提高响应速度,连接数据库代码如下: $memcache_obj = memcache_connect(localhost, 11211); memcache_add($memcache_obj, var_key, test variable, false, 30); $memcache_obj-add(var_ke...[详细]
-
PHP里向socket服务器收发数据
[PHP教程] 2022-02-13 14:26:35 92人阅读
在PHP要向其它程序发送数据,则需要使用到php的socket功能来实例了,下面我们简单看一个实例,代码如下: /*socket收发数据 @host(string) socket服务器IP @post(int) 端口 @str(string) 要发送的数据 @back 1|0 socket...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]