请问你会把你的弱点放在最显眼的地方吗?
还是你会把你的弱点放在最适当的地方?
就好像一个网站, 你还没做好付费的连接, 你会把这个信息放在网站的第一页吗?
还是你就让顾客下订单, 然后, 到了付费的时候才告诉顾客。
这样你的单继续收, 钱慢点收。 重点是顾客下订单, 对吗?
你把这个信息放在第一页, 你是帮公司倒米; 也间接把顾客对公司的信心毁掉了。。。
Jun 26, 2019
Jun 13, 2019
Google reCaptcha - file_get_contents problem
Finally I solved Google reCaptcha problem.
I was followed exactly what's Shahid Shaikh wrote in his article - google-recaptcha-tutorial
But then I am getting empty response.
$url = 'https://www.google.com/recaptcha/api/siteverify?secret='. urlencode($secretKey) .'&response='. urlencode($captcha);
$response = file_get_contents($url);
I knew the problem is on file_get_contents($url), because I tried to put the URL into browser and its 100% working well.
Uhmmmmm..................
Then I tried to change it to using PHP CURL.
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL ='https://www.google.com/recaptcha/api/siteverify',
CURLOPT_POST = true,
CURLOPT_POSTFIELDS = [
'secret' = $secretKey,
'response' = $captcha,
'remoteip' = $_SERVER['REMOTE_ADDR']
],
CURLOPT_RETURNTRANSFER = true
]);
$response = curl_exec($ch);
curl_close($ch);
$responseKeys = json_decode($response,true);
Its work perfectly with PHP CURL.
I was followed exactly what's Shahid Shaikh wrote in his article - google-recaptcha-tutorial
But then I am getting empty response.
$url = 'https://www.google.com/recaptcha/api/siteverify?secret='. urlencode($secretKey) .'&response='. urlencode($captcha);
$response = file_get_contents($url);
I knew the problem is on file_get_contents($url), because I tried to put the URL into browser and its 100% working well.
Uhmmmmm..................
Then I tried to change it to using PHP CURL.
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL ='https://www.google.com/recaptcha/api/siteverify',
CURLOPT_POST = true,
CURLOPT_POSTFIELDS = [
'secret' = $secretKey,
'response' = $captcha,
'remoteip' = $_SERVER['REMOTE_ADDR']
],
CURLOPT_RETURNTRANSFER = true
]);
$response = curl_exec($ch);
curl_close($ch);
$responseKeys = json_decode($response,true);
Its work perfectly with PHP CURL.
Jun 4, 2019
Subscribe to:
Posts (Atom)