Avoid validation for cheap SSL certificates used by Transport for Canberra
--- a/myway/myway_api.json.php
+++ b/myway/myway_api.json.php
@@ -84,6 +84,9 @@
curl_setopt($ch, CURLOPT_REFERER, "https://www.transport.act.gov.au/ARTS/getbalance.asp");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
+ // ssl ignore
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
//execute post
$pageHTML = curl_exec($ch);
if (curl_errno($ch))
--- a/stop.php
+++ b/stop.php
@@ -73,7 +73,8 @@
//}
}
}
-include_header($stop['stop_name'], "stop");
+$stopDescParts = explode("<br>",$stop['stop_desc']);
+include_header(trim(str_replace("Street: ","",$stopDescParts[0])), "stop");
/* $serviceAlerts = json_decode(getPage(curPageURL() . "/servicealerts_api.php?filter_class=stop&filter_id=".$stopid) , true);