reCAPTCHA PHP example

HTML

Paste this snippet before the closing </head> tag on your HTML template:

<script src='https://www.google.com/recaptcha/api.js'></script>

Paste this snippet at the end of the <form> where you want the reCAPTCHA widget to appear:

<div class="g-recaptcha" data-sitekey="{site key}"></div>

 

PHP Code

if($_SERVER[“REQUEST_METHOD”] === “POST”)
{
//form submitted

//check if other form details are correct

//verify captcha
$recaptcha_secret = “{secret key}”;
$response =file_get_contents(“https://www.google.com/recaptcha/api/siteverify?secret=”.$recaptcha_secret.“&response=”.$_POST[‘g-recaptcha-response’]);
$response = json_decode($response, true);
if($response[“success”] === true)
{
echo “Logged In Successfully”;
}
else
{
echo “You are a robot”;
}
}

,

Qadabra Payment Proof

http://www.qadabra.com/
paypal payment

Cacti – Fix the change page bug in Create New Graph Page

There is a bug of javascript in “Create New Graph Page”.

To fix this bug, you may modify the php file “html.php” and “html_utility.php” at <cacti directory>/lib/.

Change all the code from “function gotoPage” to “function goto$page_var”.

Cacti – Page Load Agent (URL monitoring)

Source: http://www.askaboutphp.com/44/cacti-using-cacti-to-monitor-web-page-loading-part-1.html

1. Included the xml template for host, data and graph.

2. Modified the php to support https & http both.

Download: pageload-agent

中文標點/符號倉頡碼

出處: http://www.openplatform.com.hk/Chinese/punct.htm

字根
符號
字根
符號
字根
符號
字根
符號
字根
符號
字根
符號
ZXAA
ZXAN
ZXBA
ZXBN
ZXCA
ZXCN
ZXAB
ZXAO
ZXBB
ZXBO
ZXCB
︿
ZXCO
ZXAC
ZXAP
ZXBC
ZXBP
ZXCC
ZXCP
ZXAD
ZXAQ
·
ZXBD
ZXBQ
ZXCD
ZXCQ
ZXAE
ZXAR
ZXBE
ZXBR
ZXCE
ZXCR
ZXAF
ZXAS
ZXBF
ZXBS
ZXCF
ZXCS
ZXAG
ZXAT
ZXBG
ZXBT
ZXCG
ZXCT
ZXAH
ZXAU
ZXBH
ZXBU
ZXCH
ZXCU
ZXAI
ZXAV
ZXBI
ZXBV
ZXCI
ZXCV
ZXAJ
ZXAW
Z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XS
YYYBT
YYYXT
YYYBU
YYYXU
YYYBV
YYYXV
YYYBW
YYYXW
YYYBX
YYYXX
YYYBY
˙
YYYXY

 

,

Best app for PC remote access android

1. Install app on android

Download APP

2. visit https://www.mobizen.com/ or download and install the application from the web site.

下載

,

Install PPTP server on Centos 6

1. yum install ppp -y


2 wget http://poptop.sourceforge.net/yum/stable/packages/ppp-2.4.5-33.0.rhel6.x86_64.rpm

 

3. rpm -Uhv ppp-2.4.5-33.0.rhel6.x86_64.rpm

 

4. vi /etc/pptpd.conf

– add “localip 192.168.1.1”

– add “remoteip 192.168.1.2-254”

 

4. vi /etc/ppp/options.pptpd

– add “ms-dns 8.8.8.8”

 

5. vi /etc/ppp/chap-secrets

– add “username” pptpd “password” *

 

6. vi /etc/sysctl.conf

– change “net.ipv4.ip_forward = 1”

 

7. sysctl -p

– to take effect

 

8. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

service iptables save
service iptables restart

9. chkconfig pptpd on
init 6

Disable sending email and set timezone in crontab

1. crontab -e

2. add the following two lines:

TZ=Asia/Hong_Kong
MAILTO=””

解決 Discuz X3.2 的手機觸屏版,外鏈圖片,視頻,顯示方法教程

修改: \source\function\function_discuzcode.php

尋找第250行

if(defined(‘IN_MOBILE’) && !defined(‘TPL_DEFAULT’) && !defined(‘IN_MOBILE_API’)) {

替換成以下

if($_G[setting][mobile][mobilesimpletype]) {

 

Change timezone in centos permanetly

tzselect

Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
 1) Africa
 2) Americas
 3) Antarctica
 4) Arctic Ocean
 5) Asia
 6) Atlantic Ocean
 7) Australia
 8) Europe
 9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5
Please select a country.
 1) Afghanistan 18) Israel 35) Palestine
 2) Armenia 19) Japan 36) Philippines
 3) Azerbaijan 20) Jordan 37) Qatar
 4) Bahrain 21) Kazakhstan 38) Russia
 5) Bangladesh 22) Korea (North) 39) Saudi Arabia
 6) Bhutan 23) Korea (South) 40) Singapore
 7) Brunei 24) Kuwait 41) Sri Lanka
 8) Cambodia 25) Kyrgyzstan 42) Syria
 9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
#? 13

The following information has been given:

 Hong Kong

Therefore TZ='Asia/Hong_Kong' will be used.
Local time is now: Fri Oct 31 17:10:49 HKT 2014.
Universal Time is now: Fri Oct 31 09:10:49 UTC 2014.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
 TZ='Asia/Hong_Kong'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Hong_Kong

Read the rest of this entry