Last active
August 3, 2016 08:35
-
-
Save ken-muturi/b9def659c229ac27f2f4d6df6a3d32c9 to your computer and use it in GitHub Desktop.
mark-xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function xml() | |
{ | |
$url = ''; | |
$this->load->helper('curl'); | |
$response = curl::get("{$url}:8080/services/user/devices.xml"); | |
$devices = new SimpleXMLElement($response); | |
util::printr( $devices ); | |
foreach ($devices->id as $device) | |
{ | |
$device = rawurlencode($device); | |
util::printr("{$url}:8080/services/user/varInfo.xml?id={$device}" ); | |
$variables_response = curl::get("{$url}:8080/services/user/varInfo.xml?id={$device}"); | |
$variables = new SimpleXMLElement($variables_response); | |
util::printr( $variables ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment