Day: June 23, 2015

Take a Photo and Upload it on Mobile Phones with HTML5

In my daily life, I enjoy taking photos with my smartphone and uploading them to various websites. So I started thinking, “Is it possible to implement these functions in web browser?” Although Dynamsoft ImageCapture Suite allows us to capture images from webcam, it is designed for a desktop App development on windows and Mac, not

PHP结合HTML5使用FormData对象提交表单及上传图片

FormData 对象,可以把form中所有表单元素的name与value组成一个queryString,提交到后台。在使用Ajax提交时,使用FormData对象可以减少拼接queryString的工作量。 使用FormData对象 1.创建一个FormData空对象,然后使用append方法添加key/value var formdata = new FormData(); formdata.append('name','fdipzone'); formdata.append('gender','male'); 2.取得form对象,作为参数传入到FormData对象 <form name="form1" id… Read More

使用FormData对象

利用FormData对象,你可以使用一系列的键值对来模拟一个完整的表单,然后使用XMLHttpRequest发送这个”表单”. 创建一个FormData对象 你可以先创建一个空的FormData对象,然后使用append()方法向该对象里添加字段,如下: var oMyForm = new FormData(); oMyForm.append("username", "Groucho"); oMyForm.append("accountnum", 123456); // 数字123456被立即转换成字符串"123456" // fileInputElement中已经包含了用户所选择的文件 oMyFor… Read More

GeoIP的使用 – PHP版

我们在做项目的时候,常常需要国家和地区的IP地址,下面通过介绍GeoIp的使用,让你轻松获取世界各地的国家和地区IP地址。 GeoIP介绍: 什么是GepIP ? 所谓GeoIP,就是通过来访者的IP, 定位他的经纬度,国家/地区,省市,甚至街道等位置信息。这里面的技术不算难题,关键在于有个精准 的数据库。有了准确的数据源就奇货可居赚点小钱,可是发扬合作精神,集体贡献众人享用是我们追求的。 方法1、 1)到官网:http://dev.maxmind.com/geoip/legacy/geolite/ 下载需要的版本 Language/Platform Documentation Release History Pack… Read More