Php Amazon ECS API返回安全图像URL

Php Amazon ECS API返回安全图像URL,php,amazon-web-services,amazon,Php,Amazon Web Services,Amazon,我正在使用API获取带有参数的产品列表: 'Keywords' => 'search, 'Operation' => 'ItemSearch', 'SearchIndex' => 'All', 'AssociateTag' => 'my-tag', 'AWSAccessKeyId' => 'my-key-id', 'ResponseGroup' => 'Medium', 'Service' => 'AWSECommerceService', 'Times

我正在使用API获取带有参数的产品列表:

'Keywords' => 'search,
'Operation' => 'ItemSearch',
'SearchIndex' => 'All',
'AssociateTag' => 'my-tag',
'AWSAccessKeyId' => 'my-key-id',
'ResponseGroup' => 'Medium',
'Service' => 'AWSECommerceService',
'Timestamp' => gmdate('Y-m-d\TH:i:s\Z'),
'Version' => '2010-09-01',
我只从不安全的服务器接收图像,例如

http://ecx.images-amazon.com/images/I/417YQ3xWx7L._SL75_.jpg
我了解到,此图像也可在URL下获得:

https://images-na.ssl-images-amazon.com/images/I/417YQ3xWx7L._SL75_.jpg

我可以使用API在响应中返回安全URL吗?

我发现这是一个老问题。可能还是真的

您可以用简单的str_replace替换结果url

$image-url = "http://ecx.images-amazon.com/images/I/417YQ3xWx7L._SL75_.jpg"

$new-image-url = str_replace('http://ecx.', 'https://images-na.ssl-', $image-url);

这太棒了,我想可以肯定地说,亚马逊不会很快改变这些https URL,因为许多其他网站都依赖它们。非常感谢。这对北美来说太棒了。我们需要一个维基百科来代替世界上其他地方!有人知道吗?我同意这是个好消息。若用户并没有看到绿色的https符号,他们在网站上可能会感到不安全。他们可能觉得这是不合法的。尽管我可能没有检索敏感数据,但有绿色符号看起来还是很棒,谢谢