I am using this curl code:
$key='the_key';
$url='http://api-product.skimlinks.com/categories?key='.$key.'&format=xml';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result=curl_exec($ch);
var_dump($result);
Which gives me the following string
string(575317) "<?xml version='1.0' encoding='UTF-8'?>
<skimlinksProductAPI><status>200
</status><message>OK
</message><version>3
</version><categories><category><id>4446
</id><name>Vehicles & Parts > Automotive Monitoring > Radar Detectors & Jammers
</name>
</category><category><id>4458
</id><name>Vehicles & Parts > Automotive Parts > Automotive Batteries > Fuel Cells
</name>
</category><category><id>4412
</id><name>Vehicles & Parts > Automotive Exterior > License Plates
</name>
</category><category><id>3734
</id><name>Sporting Goods > Outdoor Recreation > Camping, Backpacking & Hiking > Camp Furniture
</name>
</category><category><id>4447
</id><name>Vehicles & Parts > Automotive Monitoring > Speedometers
</name>
</category><category><id>4026
</id><name>Sporting Goods > Team Sports > Beach Volleyball > Beach Volleyball Nets
</name>
</category><category><id>3724
</id><name>Sporting Goods > Outdoor Recreation > Archery > Archery Armguards
</name>
</category><category><id>4024
</id><name>Sporting Goods > Team Sports > Beach Volleyball
</name>
</category><category><id>4025
</id><name>Sporting Goods > Team Sports > Beach Volleyball > Beach Volleyball Balls
</name>
</category><category><id>4022
</id><name>Sporting Goods > Team Sports > Basketball > Basketball Hoops
</name>
</category><category><id>4023
</id><name>Sporting Goods > Team Sports > Basketball > Basketballs
</name>
</category><category><id>4020
</id><name>Sporting Goods > Team Sports > Basketball > Basketball Hoop Parts & Accessories > Basketball Poles
</name>
</category><category><id>3725
</id><name>Sporting Goods > Outdoor Recreation > Archery > Archery Targets
</name>
</category><category><id>3798
</id><name>Sporting Goods > Outdoor Recreation > Cycling > Bicycle Parts > Bicycle Forks
</name>
</category><category><id>4028
</id><name>Sporting Goods > Team Sports > Cheerleading > Cheerleading Megaphones
</name>
</category><category><id>4029
</id><name>Sporting Goods > Team Sports > Cheerleading > Pom-Poms
</name>
</category><category><id>4607
</id><name>Vehicles & Parts > Watercraft Parts & Accessories > Watercraft Care > Watercraft Polishes
</name>
</category><category><id>4417
</id><name>Vehicles & Parts > Automotive Exterior > Winch Parts
</name>
</category><category><id>344
</id><name>Arts & Entertainment > Artwork > Prints
</name>
</category><category><id>345
</id><name>Arts & Entertainment > Artwork > Weatherprints & Outdoor Art
</name>
</category><category><id>346
</id><name>Arts & Entertainment > Collectibles
</name>
</category><category><id>347
</id><name>Arts & Entertainment > Collectibles > Autographs
</name>
</category><category><id>340
</id><name>Arts & Entertainment > Artwork > Paintings
</name>
</category><category><id>341
</id><name>Arts & Entertainment > Artwork > Photographs
</name>
</category><category><id>342
</id><name>Arts & Entertainment > Artwork > Photographs > Stock Photographs
</name>
</category><category><id>343
</id><name>Arts & Entertainment > Artwork > Posters & Reproductions
</name>
</category><category><id>2918
</id><name>Home & Garden > Lawn & Garden > Outdoor Living > Patio Umbrellas & Sunshades
</name>
</category><category><id>3996
</id><name>Sporting Goods > Racquet Sports > Tennis > Tennis Ball Savers
</name>
</category><category><id>3995
</id><name>Sporting Goods > Racquet Sports > Tennis > Tennis Ball Launchers
</name>
</category>
Just a bunch of categories, it just turns out that the string would be totally unreadable, is there a way to actually get this XML response as an array with curl ? A direct array from it or does it require conversion of the string to an array in a manual way, if so, what's the best procedure.