我正在为多个语言环境运行一个amazon affiliate网站。最近,India locale停止在索引页面上显示产品。但其他语言环境仍然可以在实时服务器上运行良好。
我去了解错误&发现印度语locale在localhost上仍然运行良好。为了更安全的一面,我再次更换所有脚本以确保它在实时服务器上复制,清除缓存等但结果是相同的。
我已经花了3天时间来识别错误。我已检查错误日志,显示与此问题无关的错误。 htaccess修改也完成但没有帮助。
修改
我想我找到了问题的根本原因。这可能看起来很奇怪,但卷曲是这里的问题。在localhost上一切都很好。但是在实时服务器上,在生成正确的签名URL之后,对于印度语言环境没有响应。使用新浏览器选项卡获取的签名URL信息的正确性如下。
<BrowseNodeLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2013-08-01">
<OperationRequest>
<HTTPHeaders>
<Header Name="UserAgent" Value="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"/>
</HTTPHeaders>
<RequestId>c2af6d3b-9a6b-4988-9101-2f324d3860c0</RequestId>
<Arguments>
<Argument Name="AWSAccessKeyId" Value="MYSECRETPUBLICKEY"/>
<Argument Name="AssociateTag" Value="MYLOCALASSOCIATEID"/>
<Argument Name="BrowseNodeId" Value="5311359031"/>
<Argument Name="Operation" Value="BrowseNodeLookup"/>
<Argument Name="ResponseGroup" Value="TopSellers"/>
<Argument Name="Service" Value="AWSECommerceService"/>
<Argument Name="Timestamp" Value="2017-08-05T14:15:18Z"/>
<Argument Name="Version" Value="2013-08-01"/>
<Argument Name="Signature" Value="acaYMWI/Moa8twZS2DI4zo/J4sjEE5kXBHsG+z9gqqM="/>
</Arguments>
<RequestProcessingTime>0.010550051</RequestProcessingTime>
</OperationRequest>
<BrowseNodes>
<Request>
<IsValid>True</IsValid>
<BrowseNodeLookupRequest>
<BrowseNodeId>5311359031</BrowseNodeId>
<ResponseGroup>TopSellers</ResponseGroup>
</BrowseNodeLookupRequest>
</Request>
<BrowseNode>
<BrowseNodeId>5311359031</BrowseNodeId>
<Name>Luxury Beauty</Name>
<TopSellers>
<TopSeller>
<ASIN>B01N6O1T8I</ASIN>
<Title>
Forest Essentials Hair Cleanser, Bhringraj and Shikakai, 200ml
</Title>
</TopSeller>
<TopSeller>
<ASIN>B007UPKJ5O</ASIN>
<Title>
Kama Ayurveda Bringadi Intensive Hair Treatment, 100ml
</Title>
</TopSeller>
<TopSeller>
<ASIN>B00803FWR0</ASIN>
<Title>Calvin Klein One Deodorant Body Spray, 152gm</Title>
</TopSeller>
<TopSeller>
<ASIN>B009TOZZ3A</ASIN>
<Title>
Forest Essentials Kashmiri Saffron and Neem Delicate Facial Cleanser, 200ml
</Title>
</TopSeller>
<TopSeller>
<ASIN>B00NXXN10M</ASIN>
<Title>
Kama Ayurveda Nalpamaradi Skin Brightening Treatment, 100ml
</Title>
</TopSeller>
<TopSeller>
<ASIN>B000C1VVQO</ASIN>
<Title>Davidoff Cool Water Woman Deodarant, 100ml</Title>
</TopSeller>
<TopSeller>
<ASIN>B007UPKK3U</ASIN>
<Title>
Kama Ayurveda Pure Rose Water Face and Body Mist, 200ml
</Title>
</TopSeller>
<TopSeller>
<ASIN>B009TP3O6O</ASIN>
<Title>
Forest Essentials Mashobra Honey, Lemon and Rosewater Facial Cleanser, 200ml
</Title>
</TopSeller>
<TopSeller>
<ASIN>B01HIATKS2</ASIN>
<Title>Kama Ayurveda Organic Neem Oil, 200ml</Title>
</TopSeller>
<TopSeller>
<ASIN>B00SUTAE6S</ASIN>
<Title>
Kama Ayurveda Bringadi Intensive Hair Treatment, 250ml
</Title>
</TopSeller>
</TopSellers>
<TopItemSet>
<Type>TopSellers</Type>
<TopItem>
<ASIN>B01N6O1T8I</ASIN>
<Title>
Forest Essentials Hair Cleanser, Bhringraj and Shikakai, 200ml
</Title>
<DetailPageURL>
https://www.amazon.in/Forest-Essentials-Cleanser-Bhringraj-Shikakai/dp/B01N6O1T8I?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01N6O1T8I
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B007UPKJ5O</ASIN>
<Title>
Kama Ayurveda Bringadi Intensive Hair Treatment, 100ml
</Title>
<DetailPageURL>
https://www.amazon.in/Kama-Ayurveda-Bringadi-Intensive-Treatment/dp/B007UPKJ5O?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B007UPKJ5O
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B00803FWR0</ASIN>
<Title>Calvin Klein One Deodorant Body Spray, 152gm</Title>
<DetailPageURL>
https://www.amazon.in/Calvin-Klein-Deodorant-Spray-152gm/dp/B00803FWR0?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00803FWR0
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B009TOZZ3A</ASIN>
<Title>
Forest Essentials Kashmiri Saffron and Neem Delicate Facial Cleanser, 200ml
</Title>
<DetailPageURL>
https://www.amazon.in/Forest-Essentials-Kashmiri-Delicate-Cleanser/dp/B009TOZZ3A?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B009TOZZ3A
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B00NXXN10M</ASIN>
<Title>
Kama Ayurveda Nalpamaradi Skin Brightening Treatment, 100ml
</Title>
<DetailPageURL>
https://www.amazon.in/Kama-Ayurveda-Nalpamaradi-Brightening-Treatment/dp/B00NXXN10M?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00NXXN10M
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B000C1VVQO</ASIN>
<Title>Davidoff Cool Water Woman Deodarant, 100ml</Title>
<DetailPageURL>
https://www.amazon.in/Davidoff-Water-Woman-Deodarant-100ml/dp/B000C1VVQO?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B000C1VVQO
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B007UPKK3U</ASIN>
<Title>
Kama Ayurveda Pure Rose Water Face and Body Mist, 200ml
</Title>
<DetailPageURL>
https://www.amazon.in/Kama-Ayurveda-Pure-Water-200ml/dp/B007UPKK3U?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B007UPKK3U
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B009TP3O6O</ASIN>
<Title>
Forest Essentials Mashobra Honey, Lemon and Rosewater Facial Cleanser, 200ml
</Title>
<DetailPageURL>
https://www.amazon.in/Forest-Essentials-Mashobra-Rosewater-Cleanser/dp/B009TP3O6O?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B009TP3O6O
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B01HIATKS2</ASIN>
<Title>Kama Ayurveda Organic Neem Oil, 200ml</Title>
<DetailPageURL>
https://www.amazon.in/Kama-Ayurveda-Organic-Neem-200ml/dp/B01HIATKS2?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01HIATKS2
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
<TopItem>
<ASIN>B00SUTAE6S</ASIN>
<Title>
Kama Ayurveda Bringadi Intensive Hair Treatment, 250ml
</Title>
<DetailPageURL>
https://www.amazon.in/Kama-Ayurveda-Bringadi-Intensive-Treatment/dp/B00SUTAE6S?SubscriptionId=AKIAJVXQJPNIJK243PUA&tag=funshoppiec0e-21&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00SUTAE6S
</DetailPageURL>
<ProductGroup>Prestige Beauty</ProductGroup>
</TopItem>
</TopItemSet>
</BrowseNode>
</BrowseNodes>
</BrowseNodeLookupResponse>
我的卷曲代码
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $request);
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$html = curl_exec($curl);
curl_close($curl);