我有一个来自CRM的实时XML提要,它包含所有列表以及图像的url。
我想使用文件夹名称(将是列表的唯一代码)将图像下载到我的PC(本地磁盘)中
我正在寻找类似清单1>文件夹>内部图像之类的东西
https://positive.mycrm.com/feed/privatesite/a562eccfaba8c9d91039b7928937bc37 t
这是我正在谈论的提要
和可以执行此操作的软件?
答案 0 :(得分:-1)
$path="https://positive.mycrm.com/feed/privatesite/a562eccfaba8c9d91039b7928937bc37";
$xmlfile = file_get_contents($path);
$ob= simplexml_load_string($xmlfile);
$json = json_encode($ob);
$configData = json_decode($json, true);
print_r($configData['property'][0]['photo'])
Response:
Array
(
[url] => Array
(
[0] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/BqVpzbEh2kOWlhdv.jpeg
[1] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/mMeCvbqcKW30XnlU.jpeg
[2] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/doH3A7Z31OK1Q5JJ.jpeg
[3] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/ZxHi3BXiKGbLBpz5.jpeg
[4] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/bFKmsIRd01jkuyr1.jpeg
[5] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/iSXJTW7PvRVzxZ5i.jpeg
[6] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/3c2RR8WzlRq3XcRc.jpeg
[7] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/pshK7VL3N6MUEG3x.jpeg
[8] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/RQV5oQWNi3pvZF28.jpeg
[9] => https://s3-ap-southeast-1.amazonaws.com/mycrm-pro-accounts-v2/property/full/1172/n2B940n5PPKjG0Bm.jpeg
)
)