請修改 apache 中的 httpd.conf
SetEnvIfNoCase Referer "^http:65.35.215.24" local_ref=1
<FilesMatch "\.(gif|jpg)">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>
或
SetEnvIfNoCase Referer "^http://ftp\.test\.idv\.tw/" local_ref=1
SetEnvIfNoCase Referer "^http://www\.test\.idv\.tw/" local_ref=1
<FilesMatch "\.(gif|jpg)">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>
加上面這些,可以防止圖片盜連。打ip或domain都可以。
看要給幾個domain或ip連,即加上去即可。
cxz012069 發表在 痞客邦 留言(0) 人氣()
oauth 2 認證方式
$url = "https://emma.pixnet.cc/oauth2/authorize";
$return_url = "http://";
$api = "https://emma.pixnet.cc/oauth2/authorize?redirect_uri=".$return_url."&client_id=".$client_id."&response_type=code";
curl($api);
之後會return code
$code = $_GET['code'];
$get_token = "https://emma.pixnet.cc/oauth2/grant?grant_type=authorization_code&code={$code}&redirect_uri={$return_url}&client_id={$client_id}&client_secret={$client_secret}";
ok,取得access_token就可以了!!
cxz012069 發表在 痞客邦 留言(0) 人氣()
1.上京城銀行開戶時,由於地處鄉下地區,銀行職員申辦時還有點生疏,說我是第二個在那邊申請西聯匯款的使用者@.@
開戶時只要準備相關證件+1000元開戶就可以,時間上大概10鐘就可以走出銀行門口了^^.
cxz012069 發表在 痞客邦 留言(0) 人氣()