線上製作QRcode

March 3, 2010 · Posted in PHP, QRcode · Comment 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>線上製作QRcode</title>
</head>

<body>
<form action="php/qr_img.php" method="get" enctype="application/x-www-form-urlencoded" name="form1" id="form1">
  <label>
  <textarea name="d" id="d" cols="45" rows="5"></textarea>
  </label>
  <input name="s" type="hidden" id="s" value="8" />
  <input name="t" type="hidden" id="t" value="j" />
  <input type="submit" name="button" id="button" value="產生QRcode圖片" />
</form>
</body>
</html>

參數說明:
d:資料
s:圖片大小 1~8
t:圖片格式 預設為PNG j為JPG格式

網址:http://elfkid.net/project/qrcode/sample/
程式下載:http://elfkid.net/project/qrcode/code/makeqrocdeonline.rar

用PHP取得client端的真實上網IP

March 2, 2010 · Posted in PHP · Comment 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function get_real_ip()
{
$ip=false;
if(!empty($_SERVER["HTTP_CLIENT_IP"]))
{
$ip = $_SERVER["HTTP_CLIENT_IP"];
}
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ips = explode (", ", $_SERVER['HTTP_X_FORWARDED_FOR']);
if ($ip)
{
array_unshift($ips, $ip); $ip = FALSE;
}
for ($i = 0; $i &lt; count($ips); $i++)
{
if (!eregi ("^(10|172\.16|192\.168)\.", $ips[$i]))
{
$ip = $ips[$i];
break;
}
}
}
return ($ip ? $ip : $_SERVER['REMOTE_ADDR']);
}
$onlineip = get_real_ip();

什麼是QRcode?

March 2, 2010 · Posted in QRcode · Comment 

有關一維條碼與二維條碼比較(取自比價王)

適合Java手機的QRcode讀取程式

March 2, 2010 · Posted in QRcode · Comment 

1.手機必須要有照相功能

2.至少30萬畫素

程式下載:下載

本張圖片內含資訊是:http://elfkid.net