diff --git a/src/RankingsClient.php b/src/RankingsClient.php index b93a211..a417fb5 100644 --- a/src/RankingsClient.php +++ b/src/RankingsClient.php @@ -13,7 +13,7 @@ class RankingsClient { private static $_user = "6719218280CF981A54BFE34E37074B7F"; - private static $_pass = "2633963A462E2831B6D5F424B195D2DB"; + private static $_pass = "D32FE6EDB994876894DC8CD625D3CE07"; public $_soap_client; protected $_personal_key; protected $_personal_key_member_number; @@ -56,12 +56,11 @@ public function __construct($personal_key, $membership_number) $this->_soap_client = new SoapClient( null, [ - "location" => "https://www.swimmingresults.org/soap/BritSwimWebServ.php", - "uri" => "https://www.swimmingresults.org/soap", + "location" => "https://entriesapi.swimmingresults.org/v1/", + "uri" => "https://entriesapi.swimmingresults.org/v1/", "trace" => 1 ] ); - $this->_soap_client->wsdl = false; $this->_checkConnection(); } catch (SoapFault $fault) { throw new ConnectionException("Failed to connect to rankings DB - " . $fault->getMessage()); @@ -89,7 +88,10 @@ protected function _checkConnection() try { $this->getMemberDetails(-1); } catch (SoapFault $fault) { - if (strpos($fault->getMessage(), "Invalid Personal Key") !== false || strpos($fault->getMessage(), "No Personal Key") !== false) { + if ( + strpos($fault->getMessage(), "Invalid Personal Key") !== false + || strpos($fault->getMessage(), "No Personal Key") !== false + ) { throw new InvalidPersonalKey("Invalid personal key"); } } catch (MemberNotFound $exception) { diff --git a/src/SoapClient.php b/src/SoapClient.php index 249c4f6..5c244ca 100644 --- a/src/SoapClient.php +++ b/src/SoapClient.php @@ -28,10 +28,7 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0 protected function get_user_agent() { - if ($this->wsdl) { - return "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; - } - return "SOAP Toolkit 3.0"; + return "Meet Organisation Rev 5.3 Web Services"; } } \ No newline at end of file