Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function objectToArray($data)
- {
- if (is_object($data)) {
- // Gets the properties of the given object
- // with get_object_vars function
- $d = get_object_vars($data);
- }
- if (is_array($data)) {
- /*
- * Return array converted to object
- * Using __FUNCTION__ (Magic constant)
- * for recursive call
- */
- return array_map(__FUNCTION__, $data);
- } else {
- // Return array
- return $data;
- }
- }
- $url = curl_init("http://cards.renmx.com/json.php");
- curl_setopt($url, CURLOPT_HTTPHEADER, array(//cookie));
- $urlReturn = curl_exec($url);
- //$urlDecode = json_decode($urlReturn);
- //$jsonArray = objectToArray($urlDecode);
- //print_r($jsonArray);
- //print("<br /> \n \n");
- //var_dump($jsonArray);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment