码迷,mamicode.com
首页 >  
搜索关键字:file_get_contents    ( 388个结果
(转)php发送get、post请求的几种方法
方法1: 用file_get_contents 以get方式获取内容1 方法2: 用fopen打开url, 以get方式获取内容 1 方法3:用file_get_contents函数,以post方式获取url 1 'bar'); 3 //生成url-encode后的请求字符串,将数组转换为字符串 ....
分类:Web程序   时间:2015-03-31 17:48:46    阅读次数:157
SAE云平台上传图片和发送邮件
1.远程图片保存至Storage 其中public是Storage中的容器名,"目录1/目录2/"是容器下的路径 $file_content是得到的文件数据1 $s = new SaeStorage();2 $file_content= file_get_contents('http://abc.....
分类:Web程序   时间:2015-03-28 11:18:47    阅读次数:419
php发送get、post请求的几种方法
方法1: 用file_get_contents 以get方式获取内容 方法2: 用fopen打开url, 以get方式获取内容 方法3:用file_get_contents函数,以post方式获取url 'bar'); //生成url-encode后的请求字符串,将数组转换为字...
分类:Web程序   时间:2015-03-20 20:05:39    阅读次数:184
PHP获取操作系统、IP、地理位置、浏览器、ISP等信息_PHP类代码
PHP语言、浏览器、操作系统、IP、地理位置、ISP,本PHP类里面有以下几种方法,同时也是用法说明:GetIP(); $AddIsp = mb_convert_encoding(file_get_contents('http://open.baidu.com/ipsearch/stn...
分类:Web程序   时间:2015-03-12 22:27:02    阅读次数:239
解析PHP中的file_get_contents获取远程页面乱码的问题【转】
在工作中,遇到一个问题。我需要将一个网址(该网址是一个json数据的接口,即 打开该网址,在浏览器中显示的是json数据),我使用file_get_contents($url),数据是乱码的。通过查询,知道有解决办法。如下:http://www.xuexijc.com/news/PHP/42412....
分类:Web程序   时间:2015-03-12 11:10:55    阅读次数:123
PHP之网络编程
GET:$htmlsource=file_get_contents("http://192.168.0.13/s/interface/shangpin/shangpinDL"); $postArray = iconv("utf-8", "gbk",$htmlsource); //$postArray...
分类:Web程序   时间:2015-03-03 13:11:40    阅读次数:157
php 模拟get提交
方法一:$re = file_get_contents($url);print_r($re);方法二:$ch = curl_init("http://www.jb51.net/") ; curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ; curl_set...
分类:Web程序   时间:2015-02-27 16:45:45    阅读次数:166
php短址转换实现
从昨天下午到现在 推翻了一个又一个的信息存储方案,从mysql到加上内存不受限制的file_get_contents,再到格式化输入的fscanf,最终选择了比较成熟稳定的读取ini的方法。 允许转载,转载须注明出处。 整个主程序只有两个文件 zipurl.php、index.php zipurl.php: <?php #此文件用于转换url #整理url function dealur...
分类:Web程序   时间:2015-02-10 15:25:55    阅读次数:141
php禁用某ip或者ip地址段访问
因为还没有深入学习Apache和nginx 所以用PHP写了一个可以禁用地址的小程序 用法 即可 禁用单个ip: <?php //禁用ip地址 $ip=$_SERVER["REMOTE_ADDR"]; $ban=file_get_contents("ban.dat"); if(stripos($ban,$ip)) { die("Your IP Address is:$ip,you're f...
分类:Web程序   时间:2015-02-06 09:43:19    阅读次数:146
file_get_contents函数和curl函数不能用
某天file_get_contents()突然不能用了,检查了下php配置文件allow_url_fopen=on没问题各种重启也没用最后在ssh下执行chmod 755 /etc/resolv.conf一条命令解决了,具体原因还在探索中。。。。?知道的博友麻烦留言告知,谢谢
分类:Web程序   时间:2015-02-04 18:27:03    阅读次数:189
388条   上一页 1 ... 28 29 30 31 32 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!