I don't have this script on my site, but it is probably related to the changes the NWS made this week.
Try changing this:
$nwslsr = "http://forecast.weather.gov/product.php?site=".strtoupper($wfo_id)."&issuedby=".strtoupper($wfo_id2)."&product=LSR&format=TXT&version=".$rep_ver."&glossary=0";
To:
$nwslsr = "https://forecast.weather.gov/product.php?site=".strtoupper($wfo_id)."&issuedby=".strtoupper($wfo_id2)."&product=LSR&format=TXT&version=".$rep_ver."&glossary=0";
and
This:
$url = str_replace("http://","",$URL);
To:
$url = str_replace("https://","",$URL);