Changeset 1104510
- Timestamp:
- 03/03/2015 10:49:36 PM (11 years ago)
- Location:
- shopsite-plugin/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
shopsite.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shopsite-plugin/trunk/readme.txt
r1097525 r1104510 26 26 27 27 == Changelog == 28 = 1.5.2 = 29 * Don't require SSL verification of secure URLs. 30 28 31 = 1.5.1 = 29 32 * Renamed options and variables to minimize potential conflict with other plugins. Minor UI changes. Delete data when deleting plugin. -
shopsite-plugin/trunk/shopsite.php
r1097525 r1104510 2 2 /** 3 3 * @package ShopSite 4 * @version 1.5. 14 * @version 1.5.2 5 5 */ 6 6 /* … … 9 9 Description: ShopSite plugin to put products into your WordPress blog 10 10 Author: ShopSite 11 Version: 1.5. 111 Version: 1.5.2 12 12 Author URI: http://shopsite.com/ 13 13 */ … … 58 58 59 59 function load_plugin() { 60 $version = "1.5. 1";60 $version = "1.5.2"; 61 61 if ( is_admin() ) { 62 62 $running_version = get_option('ss_version'); … … 408 408 $shopsite_url = get_option('ss_shopsite_url'); 409 409 $url = $shopsite_url."&operation=get_setting&setting=output_url"; 410 $outputurl = curl_open($url) ;411 if ( strlen($outputurl) > 10) {410 $outputurl = curl_open($url)[0]; 411 if ($outputurl && strlen($outputurl) > 10) { 412 412 $media_url = $outputurl."/media/"; 413 413 update_option('ss_media_url', $media_url); … … 633 633 ini_set('allow_url_fopen', $url_openable); 634 634 print(stream_get_contents($handle));*/ 635 print(curl_open($url)); 635 $product_data = curl_open($url)[0]; 636 if ($product_data) 637 print($product_data); 638 else 639 print($product_data[1]); 636 640 } 637 641 … … 651 655 652 656 653 654 /*$shopsite_url = get_option('shopsite_url'); 655 $url_openable = ini_get('allow_url_fopen'); 656 ini_set('allow_url_fopen', true); 657 $url = $shopsite_url; 658 $handle = fopen($url,'r'); 659 ini_set('allow_url_fopen', $url_openable); 660 661 if ($handle == false) 662 return array("success"=>false, "error"=>"Check your callback URL");*/ 663 664 if (curl_open(get_option('ss_shopsite_url')) == false) 665 return array("success"=>false, "error"=>"Check your callback URL"); 657 $res = curl_open(get_option('ss_shopsite_url')); 658 if ($res[0] == false) 659 return array("success"=>false, "error"=>$res[1]); 666 660 667 661 return array("success"=>true); … … 677 671 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 678 672 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); 673 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 674 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 679 675 $html = curl_exec($ch); 676 if (curl_errno($ch)) 677 $retval = array(false, curl_error($ch)); 678 else 679 $retval = array($html); 680 680 681 curl_close($ch); 681 682 682 return $ html;683 return $retval; 683 684 } 684 685
Note: See TracChangeset
for help on using the changeset viewer.