Author Topic: WXContact appears to not work on GoDaddy again  (Read 612 times)

0 Members and 1 Guest are viewing this topic.

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2432
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WXContact appears to not work on GoDaddy again
« Reply #1 on: May 18, 2019, 06:23:15 PM »
That's a connection time-out.  Your webserver may have been trying to do a verify_peer, and timed out.. GoDaddy seems to have a problem with that.

Try changing contact-inc.php

Code: [Select]
$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' .
$recaptchaSecretKey.'&response='.$_POST['g-recaptcha-response']);


to

Code: [Select]
   $STRopts = array(
  'ssl'=>array(
  'method'=>"GET",
  'protocol_version' => 1.1,
'verify_peer' => false,
  'header'=>"Cache-Control: no-cache, must-revalidate\r\n" .
"Cache-control: max-age=0\r\n" .
"Connection: close\r\n" .
"User-agent: Mozilla/5.0 (contact-inc.php - saratoga-weather.org)\r\n" .
"Accept: application/json\r\n"
  )
);

   $STRcontext = stream_context_create($STRopts);

  $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' .
$recaptchaSecretKey.'&response='.$_POST['g-recaptcha-response'],false,$STRcontext);
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything