脚本宝典收集整理的这篇文章主要介绍了php – 用于返回安全图像URL的Amazon ECS 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);
以上是脚本宝典为你收集整理的php – 用于返回安全图像URL的Amazon ECS API全部内容,希望文章能够帮你解决php – 用于返回安全图像URL的Amazon ECS API所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。