-
php中fsockopen模仿post与get详解
[PHP教程] 2022-02-13 14:15:59 85人阅读
在php中fsockopen函数可以模仿用户去访问一些网站并且还可以带一些常用的信息,如果浏览器,IP,post,get 等等数据,下面我分别一来给大家介绍介绍. 如果你要使用fsockopen函数我们必须在php.ini中把allow_url_fopen = O...[详细]
-
PHP与asp.net C#可共用的可逆加密算法
[PHP教程] 2022-02-13 14:15:26 136人阅读
因为工作需我们需要在php中生成加密然后在asp.net中接受过来的密码再解密,下面我找到一个PHP与asp.net C#可共用的可逆加密算法,有需要了解的同学可参考. php加密算法,代码如下: ?php class DES { var $key; var $iv;...[详细]
-
PHP多线程的实现方法详解
[PHP教程] 2022-02-13 14:15:04 164人阅读
多线程是java中一个很不错的东西,很多朋友说在php中不可以使用PHP多线程了,其实那是错误的说法PHP多线程实现方法和fsockopen函数有关,下面我们来介绍具体实现程序代码,有需要了解的同学可参考. 当有人想要实现并发功...[详细]
-
php定时执行任务实现办法详解
[PHP教程] 2022-02-13 14:14:41 94人阅读
每个PHP脚本都限制了执行时间,所以我们需要通过 set_time_limit 来设置一个脚本的执行时间为无限长,然后使用 flush() 和 ob_flush() 来清除服务器缓冲区,随时输出脚本的返回值,当我们执行后,每隔5秒钟,我们会得到一...[详细]
-
PHP页面跳转和跨站提交伪造Referer地址来源
[PHP教程] 2022-02-13 14:13:41 59人阅读
一、尝试过的URL跳转方法,代码如下: echo meta http-equiv=refresh content=0; URL=.$url.; echo scrīpt language=Javascrīptwindow.location.href=.$url.;/scrīpt; echo script language=Javascrīptwindow.loca...[详细]
-
php中读写文件和读写数据库的效率
[PHP教程] 2022-02-13 14:12:58 157人阅读
测试程序如下:说明1,由于读数据库语句调用简单的封包函数两次,所以把读文件也改成连续调用两次,数据库记录ID为1就在第一条,并且唯一索引. 测试实例代码如下: //说明2:测试两次一次是4K数据,一次是整形数据 set_time_...[详细]
-
php Header函数实现下载短点续传程序
[PHP教程] 2022-02-13 14:12:20 153人阅读
本文章给大家来总结几种实现下载短点续传程序功能,这些函数中主要是用到了php的header函数,有需要了解的朋友可进入参考. 例如:下载时输出,下载文件大小,文件名等等,前提是.htaccess文件的配置需要添加一句 :SetEnv n...[详细]
-
php curl模拟post请求提交数据例子总结
[PHP教程] 2022-02-13 14:11:24 118人阅读
在php中要模拟post请求数据提交我们会使用到curl函数,下面我来给大家举几个curl模拟post请求提交数据例子有需要的朋友可参考参考. 注意:curl函数在php中默认是不被支持的,如果需要使用curl函数我们需在改一改你的php...[详细]
-
php学习笔记之PHP扩展开发教程
[PHP教程] 2022-02-13 14:09:20 91人阅读
PHP扩展开发不是所有开发者都会操作的一个东西,下面我来演示一个关于PHP扩展开发实现过程,各位同学有需要可进入参考. 我们先假设需要这样一个扩展,提供一个叫tao_string的函数,他的主要作用是返回一段字符,对应的PHP...[详细]
-
PHP的CURLOPT_POSTFIELDS参数使用数组和字符串
[PHP教程] 2022-02-13 14:08:59 147人阅读
PHP的CURL组件是非常常用的HTTP请求模拟器。 通常要发送post数据时,我已经习惯于这样写: curl_setopt($ch,CURLOPT_POSTFIELDS,$post_data); 但是在向某一个服务器发送请求的时候,服务器返回500,而使用socket方式连接...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]