I am hoping some is going to be able to help me here because i am going crazy trying to figure this out.
I am trying to code some php to interact with a web service that another company has provided. Below is the php code i have created.
<?php $soapclient = new soapclient("http://www.humyo.com/Assets/StorageAPI.wsdl"); $hash = $soapclient->getAuthToken('emailaddress','password','API v1.0'); print_r($hash); $result = $soapclient->createUser($hash -> authToken,'31','65','emailaddresshere','simon','22563','GB'); print_r($result);
What i am trying to achieve starts from the $hash line. The results of this query when actioned on its own is:
( [authToken] => MGViMmViMjVlMDQxMDNjZmNiZmVhY2aiMzkYYYZjZjM4OTc2IQ==
[user_id] => 34 )
What i need to find out is how from that line i can just pull the authToken and insert it to the $result query. I currently have $hash -> authToken but that does not work.
Does any one know how or a way i can pull just the authToken from the first query and enter it in to the second query.
If you need any more info please let me know.