<?php class Bysoft_Myimage_Helper_Data extends Mage_Core_Helper_Abstract { function common_filesize($url) { $user=''; $pass=''; $parse = parse_url($url); $host = $parse['host']; if ($host == 'gogear.preprodbysoftchina.com') { $user='gogear'; $pass='bysoft2014'; return $this->remote_filesize($url, $user, $pass); } else { return getimagesize($url); } } function remote_filesize($url, $user, $pass) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass"); $data = curl_exec($ch); curl_close($ch); $ext = pathinfo($url,PATHINFO_EXTENSION); $filename = BP.DS.'media'.DS.'remote_file'.DS.time().'.'.$ext; $fp = @fopen($filename, "w+"); fwrite($fp, $data); fclose($fp); $info = getimagesize($filename); @unlink($filename); return $info; } }
相关推荐
Magento user guide, useful Magento doc to instructor user build and manage their stores
You’ll start by getting a general understanding of what Magento is, why and how you should use it, and whether it is possible and feasible to migrate from an old web store to Magento 2. As you work ...
hs / module-image-clean 在 Magento 中删除产品不会删除它存储在服务器上的图像。 这些图像可能会永远留在那里堵塞您的磁盘空间。 Hungersoft 的扩展允许您从 Magento 管理员轻松删除这些未使用的产品图像。 ...
Get a detailed insight into the structure of Magento Learn about event/observer-driven modules Get a hands-on introduction to custom shipping and payment methods ☆ 出版信息:☆ [作者信息] Branko ...
magento 常用的方法 与 总结, 对于起步学习magento 的非常有帮助
Magento cloud - Developing and Maintaining your Cloud Project.
对于首次安装magento过程中出现的问题的小结
You’ll find lots of step-by-step instructions, screenshots and examples, plus a comprehensive online configuration reference that is linked throughout the material. After learning the basics, you ...
Chapter 1, Installing Magento 2 on Apache and NGINX, is a totally different ballgame compared to Magento 1. Where Magento 1 could be installed through FTP or SSH, Magento 2 is installable only via the...
magento数据结构分析 magento数据字典
This document is the help for developers and users of eCommerce web site based on Magento v1.9.
magento批量上传多图、添加自定义属性插件,包含1.4和1.5+的版本
magik shoes magento 模板, magento 1.7 模板
Magento1社区版,1.9可用,官网售价299刀 前台演示地址:http://points.demo.aheadworks.com/index.php/points/reward/ 后台演示地址:...
magento的SMTP插件magento的SMTP插件magento的SMTP插件
New GUI added 10 predefined block positions on each page Ability to place any block in any position by easily ... Meets Magento programming practices for most versions and customizations compatibility
CosmoCommerce Alipay Payment Gateway for Magento 我们做支付接口很久了,发现的确由于收费限制了很多人去用支付模块,因此开源出来,让更多的人用magento,了解magento做生态环境才是我们的愿景.希望大家可以支持! ...
深入理解Magento 由精东博客下载下来制作成pdf
Magento插件开发手册 Magento Extension Developers Guide
Athlete Magento主题,兼容Magento 1.9.x, 1.8.x, 1.7.x ,特点:完全自适应(响应式布局),自定义子主题,无限颜色,完全自定义,一键安装演示,小工具化横幅系统,颜色选择,MEGA菜单,多商店支持,自定义产品...