-
php curl 分离header与body信息
[PHP教程] 2022-01-18 15:43:53 158人阅读
php中可以通过curl来模拟http请求,同时可以获取http response header和body,当然也设置参数可以只获取其中的某一个,当设置同时获取response header和body时候,它们会一同作为结果返回,这时需要我们自己来分离它们。 ...[详细]
-
php curl 伪造IP来源程序完成代码
[PHP教程] 2022-01-18 15:43:15 188人阅读
今天没事做自己写了一个php curl 伪造IP来源程序实例程序,这里可以伪造IP来源,伪造域名,伪造用户信息. 定义伪造用户浏览器信息HTTP_USER_AGENT,代码如下: $binfo =array(Mozilla/4.0 (compatible; MSIE 8.0; Windows...[详细]
-
PHP JSON数据处理示例程序用法
[PHP教程] 2022-01-18 15:41:35 151人阅读
在php中JSON数据处理最常用的就是直接使用json_encode()与json_decode()函数进行处理,就这两个json处理函数给各位同学详细介绍json在应用中的各种用法. json_encode(),PHP数据-JSON json_encode只有一个参数,参数除...[详细]
-
PHP 运用curl_init发起http请求模仿登录
[PHP教程] 2022-01-18 15:41:02 84人阅读
http请求包括两种,一种是我们普通的http请求登录,另一种是另一种https请求登录,下面我来分别给各位同学详细介绍利用curl_init来实现http与https进行登录。 备注:使用curl_init函数,必须要打开这个php扩展。 1.打开ph...[详细]
-
PHP淘宝IP数据获得用户IP及地理位置
[PHP教程] 2022-01-18 15:40:23 164人阅读
我们有时不想利用自己的数据库存储IP地址,自己的IP库更新慢不及时,我们可以直接使用第三方的IP库来操作,这里介绍利用淘宝IP数据获取用户IP及地理位置实现方法. 在直接在ie浏览器中打开下面地址 http://ip.taobao.com...[详细]
-
php测试代码执行消耗的内存与时间
[PHP教程] 2022-01-18 15:39:58 83人阅读
在php中要测试代码执行消耗的内存和时间我们可以直接使用俩函数,microtime 和 memory_get_usage就可以了,下面我来给大家介绍介绍。 我们先来看看microtime 和 memory_get_usage函数用法吧 含义和用法 microtime() 函...[详细]
-
php 判断gif图片是不是动画图片
[PHP教程] 2022-01-18 15:39:20 80人阅读
如果利用php来判断就简单了,原理很简单,识别是否是动画,要检查文件中是否包含chr(021).chr(0xff).chr(0x0b).NETSCAPE2.0chr(021).chr(0xff),是gif图片中扩展功能段的标头NETSCAPE2.0是扩展功能执行的程序名,代码如下...[详细]
-
php生成EXCEL文档示例程序
[PHP教程] 2022-01-18 15:38:27 103人阅读
原生态的写法 原始方式:发送header,用附件的表头发送到用户浏览器表示是要下载的,然后读出数据库中的数据,一条一条的解析,写入excel格式的文件中,代码如下: ?php $DB_Server = localhost; $DB_Username = root; $DB_...[详细]
-
PHP和MySQL生成的标签云完成代码
[PHP教程] 2022-01-18 15:37:46 59人阅读
用户输入文本和输入的文本在过去的一个标签云,标签云是一个用户生成的标签的可视化描述,或只是一个网站的文字内容,通常用来描述网站的内容。 为此,我们将创建一个HTML表格,将接受用户文本,也让用户可以看到从 MyS...[详细]
-
php 完成jquery+ajax 跨域数据调用实例
[PHP教程] 2022-01-18 15:37:16 186人阅读
本文章是基于jquery的ajax来实现数据跨域调用,主要是利用php实时返回json数据,这样就方便的实现的ajax跨域数据调用了。 jquery文件我这里不提供下载了,大家可以直接到google去下载哦,可以在页面定义一个调用方法,...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]