Advertisement
Guest User

Popshop Pop In Code

a guest
Oct 4th, 2011
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <?php
  2. # Determine the current base URL
  3. if(!isset($_SERVER['REQUEST_URI'])) {
  4. $psps_base_url = $_SERVER['PHP_SELF'];
  5. if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $psps_base_url .= $HTTP_SERVER_VARS['QUERY_STRING']; }
  6. } else {
  7. $psps_base_url = $_SERVER['REQUEST_URI'];
  8. }
  9.  
  10. $psps_parameters = '';
  11.  
  12. foreach ($_REQUEST as $key => $value) {
  13. if (strpos($key,"psps_") > -1 ) {
  14. $psps_parameters .= '&'.$key.'='.urlencode($value);
  15. $psps_base_url = str_replace('&'.$key.'='.urlencode($value), "", $psps_base_url);
  16. $psps_base_url = str_replace($key.'='.urlencode($value), "", $psps_base_url);
  17. }
  18. }
  19.  
  20. $psps_parameters .= "&psps_show_search=true";
  21. $psps_parameters .= "&psps_show_navigation=true";
  22. $psps_parameters .= "&psps_show_products=true";
  23.  
  24. $psps_url = "?psps_base_url=".urlencode($psps_base_url);
  25.  
  26. $psps_url="http://shops.popshops.com/shops/php/bwh1u4wom9b4gsaxrcvctxvyl$psps_url$psps_parameters";
  27.  
  28. # Include the shop
  29. if (function_exists('curl_init')) {
  30. $shop=curl_init();
  31. curl_setopt($shop,CURLOPT_URL,$psps_url);
  32. curl_exec($shop);
  33. curl_close($shop);
  34. } else {
  35. readfile($psps_url);
  36. }
  37. ?>
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement