Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $msie = strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE') ? true : false;
- $firefox = strpos($_SERVER["HTTP_USER_AGENT"], 'Firefox') ? true : false;
- $safari = strpos($_SERVER["HTTP_USER_AGENT"], 'Safari') ? true : false;
- $opera = strpos($_SERVER["HTTP_USER_AGENT"], 'Opera') ? true : false;
- $chrome = strpos($_SERVER["HTTP_USER_AGENT"], 'Chrome') ? true : false;
- $crios = strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') ? true : false;
- ?>
- <?php
- //Firefox
- if ($firefox || $safari || $msie || $opera && (!$chrome || !$crios)) { ?>
- <div id="amazon_search">
- <script charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822/US/stcaccessabil-20/8002/afbd9144-5e7d-4aa3-ba17-cb43a5f5a94c">
- </script>
- <noscript><p><a href="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fstcaccessabil-20%2F8002%2Fafbd9144-5e7d-4aa3-ba17-cb43a5f5a94c&Operation=NoScript">Amazon.com Widgets</a></p></noscript>
- </div>
- <?php } ?>
- <?php
- // Chrome. Uses the engine - webkit
- if ($chrome || $crios && (!$firefox|| !$safari || !$msie || !$opera)) { ?>
- <div id="amazon_search">
- <img style="float:left; margin-right:0.4em; vertical-align:top;" src="wp-content/uploads/amazon_assoc_search_box-96x80.png" width="96" height="80" alt="small amazon search box"><strong>If you are using the Google Chrome browser</strong> or not using Javascript, you can't see our Amazon Associates search box here. <strong>Use Firefox, Safari, Opera, or other browser</strong> to use the search box or go directly <a href="http://wms.assoc-amazon.com/20070822/US/html/searchbox_27.html?t=stcaccessabil-20">to our search box with our embedded code</a>. We are sorry Chrome no longer supports the Amazon.com widget.
- </div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement