[Solved] Fetch the products URL [closed]


There are many ways to get XML from a URL – perhaps the simplest is using simplexml_load_file :

$xml = simplexml_load_file($url);
print_r($xml);

Where obviously $url is your URL. You can add the username and password into the URL like http://username:password@url/

Or you could use cURL and then simplexml_load_string to parse the results:

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);
$result = curl_exec($ch);
curl_close($ch);

$xml = simplexml_load_string($result);

0

solved Fetch the products URL [closed]