三态物流接口模块

用于收藏精华贴子、网友共享的资料等。可以回复,不能发新贴。

版主: daimadaquan

版面规则
本版面不能发新贴,可以回复

Re: 三态物流接口模块

帖子li-he-qi » 2012-02-06 23:00

zhanghao162兄弟, 你可能没有用过MZMT, 这个有显示重量的, 直接上图:

MZMT 重量.jpg
MZMT 重量.jpg (9.51 KiB) 被浏览 387 次
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-02-13 13:20

今天在CACHE目录发现很多同样的错误都跟三态插件有关, 不知道是插件本身的原因, 还是三态接口的原因:

[11-Feb-2012 08:42:46] PHP Warning: DOMDocument::load(http://www.sendfromchina.com/shipfee/ou ... ode=HKBRAM) [<a href='domdocument.load'>domdocument.load</a>]: failed to open stream: HTTP request failed! in /***/includes/modules/shipping/sfc.php on line 99

[11-Feb-2012 08:42:46] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: I/O warning : failed to load external entity &quot;http://www.sendfromchina.com/shipfee/out_rates?country=Brazil&amp;weight=0.05&amp;mode=HKBRAM&quot; in /***/includes/modules/shipping/sfc.php on line 99

[11-Feb-2012 08:43:07] PHP Warning: DOMDocument::load(http://www.sendfromchina.com/shipfee/ou ... eight=0.05) [<a href='domdocument.load'>domdocument.load</a>]: failed to open stream: Connection timed out in /***/includes/modules/shipping/sfc.php on line 99

[11-Feb-2012 08:43:07] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: I/O warning : failed to load external entity &quot;http://www.sendfromchina.com/shipfee/out_rates?country=Brazil&amp;weight=0.05&quot; in /***/includes/modules/shipping/sfc.php on line 99


源代码是:
$doc = new DOMDocument();
$doc->load( REQUIRERATE . $profile);

大家可点击文中的链接, 就会看到三态返回的结果, 明明链接中有0.05的重量, 三态那边却没有接收到
-----------------------------------------------------
另外还有一些其他的错误, 不是三态的, 不知道严重不, 期待高手给翻译翻译:
[09-Feb-2012 07:28:55] PHP Warning: fputs(): supplied argument is not a valid stream resource in /***/includes/classes/class.smtp.php on line 166
[09-Feb-2012 07:28:55] PHP Warning: fputs(): supplied argument is not a valid stream resource in /***/includes/classes/class.smtp.php on line 166

166行的源代码是:
function Authenticate($username, $password) {
// Start authentication
fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);


[10-Feb-2012 04:01:05] PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /***/includes/modules/pages/payment_moneybookers/header_php.php on line 15

15行的源代码是:
$get = implode("&amp;", $tab);
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-03-29 10:03

li-he-qi 写道:今天在CACHE目录发现很多同样的错误都跟三态插件有关, 不知道是插件本身的原因, 还是三态接口的原因:

[11-Feb-2012 08:42:46] PHP Warning: DOMDocument::load(http://www.sendfromchina.com/shipfee/ou ... ode=HKBRAM) [<a href='domdocument.load'>domdocument.load</a>]: failed to open stream: HTTP request failed! in /***/includes/modules/shipping/sfc.php on line 99

[11-Feb-2012 08:42:46] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: I/O warning : failed to load external entity &quot;http://www.sendfromchina.com/shipfee/out_rates?country=Brazil&amp;weight=0.05&amp;mode=HKBRAM&quot; in /***/includes/modules/shipping/sfc.php on line 99

[11-Feb-2012 08:43:07] PHP Warning: DOMDocument::load(http://www.sendfromchina.com/shipfee/ou ... eight=0.05) [<a href='domdocument.load'>domdocument.load</a>]: failed to open stream: Connection timed out in /***/includes/modules/shipping/sfc.php on line 99


源代码是:
$doc = new DOMDocument();
$doc->load( REQUIRERATE . $profile);

大家可点击文中的链接, 就会看到三态返回的结果, 明明链接中有0.05的重量, 三态那边却没有接收到




上面的错误又发生, 已经两天时间了, 原以为和上次一样, 过一会就会好的, 但是这次好像不同, 现在网站已经无法运作了, 求JACK大大显身救命 :cry: , 这个到底是 三态在限制 还是 G F W 在限制呢:
[28-Mar-2012 18:22:08] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: expected '&gt;' in http://www.sendfromchina.com/shipfee/ou ... p;weight=2, line: 105 in /***/html/includes/modules/shipping/sfc.php on line 99
[28-Mar-2012 18:22:08] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Premature end of data in tag GetMailServiceResponse line 2 in http://www.sendfromchina.com/shipfee/ou ... p;weight=2, line: 105 in /***/html/includes/modules/shipping/sfc.php on line 99





[28-Mar-2012 18:24:34] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Premature end of data in tag rate line 66 in http://www.sendfromchina.com/shipfee/ou ... p;weight=2, line: 70 in /***/html/includes/modules/shipping/sfc.php on line 99
[28-Mar-2012 18:24:34] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Premature end of data in tag GetMailServiceResponse line 2 in http://www.sendfromchina.com/shipfee/ou ... p;weight=2, line: 70 in /***/html/includes/modules/shipping/sfc.php on line 99



[28-Mar-2012 18:02:50] PHP Warning: DOMDocument::load(http://www.sendfromchina.com/shipfee/ou ... p;weight=2) [<a href='domdocument.load'>domdocument.load</a>]: failed to open stream: HTTP request failed! in /***/html/includes/modules/shipping/sfc.php on line 99
[28-Mar-2012 18:02:50] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: I/O warning : failed to load external entity &quot;http://www.sendfromchina.com/shipfee/out_rates?country=Australia&amp;weight=2&quot; in /***/html/includes/modules/shipping/sfc.php on line 99


[28-Mar-2012 18:31:10] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Couldn't find end of Start Tag dea line 69 in http://www.sendfromchina.com/shipfee/ou ... weight=0.5, line: 69 in /***/html/includes/modules/shipping/sfc.php on line 99


[28-Mar-2012 17:08:59] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Specification mandate value for attribute unit in http://www.sendfromchina.com/shipfee/ou ... weight=0.2, line: 70 in /***/html/includes/modules/shipping/sfc.php on line 99

[28-Mar-2012 17:08:59] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Premature end of data in tag GetMailServiceResponse line 2 in http://www.sendfromchina.com/shipfee/ou ... weight=0.2, line: 70 in /***/html/includes/modules/shipping/sfc.php on line 99
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子Jack » 2012-03-31 23:26

打开文件 /includes/modules/shipping/sfc.php

找到行:
$profile .= '&mode=' . $method;
在下面增加代码:
} else {
$profile .= '&';

这个问题是有点奇怪,三态网站能处理这样的请求:
http://www.sendfromchina.com/shipfee/ou ... eight=1.05
但是无法处理
http://www.sendfromchina.com/shipfee/ou ... eight=0.05
就是重量小于1公斤会出错
所以修改请求为下面这样就可以了
http://www.sendfromchina.com/shipfee/ou ... ight=0.05&
头像
Jack
论坛版主
论坛版主
 
帖子: 11665
注册: 2004-12-16 10:04

Re: 三态物流接口模块

帖子li-he-qi » 2012-04-04 20:52

Jack 写道:打开文件 /includes/modules/shipping/sfc.php

找到行:
$profile .= '&mode=' . $method;
在下面增加代码:
} else {
$profile .= '&';

这个问题是有点奇怪,三态网站能处理这样的请求:
http://www.sendfromchina.com/shipfee/ou ... eight=1.05
但是无法处理
http://www.sendfromchina.com/shipfee/ou ... eight=0.05
就是重量小于1公斤会出错
所以修改请求为下面这样就可以了
http://www.sendfromchina.com/shipfee/ou ... ight=0.05&


JACK大鸟又显身了 :D , 多谢JACK 老大的解答 !

首先报告, 现在三态插件又恢复正常了, 原因不详, 这次持续了2天, 不管插件在我的网站上是否正常, 期间在三态自己的网站上查询运费都是正常的.


这个现在点击好像又是能够处理的了 :?

我刚刚又点击了我自己发贴中的链接, 和JACK老大贴子中的链接, 比较了一下, 能正常返回结果的链接是这样的http://www.sendfromchina.com/shipfee/out_rates?country=Canada&weight=0.05

所有出错的查询链接是都是这样的形式:
http://www.sendfromchina.com/shipfee/ou ... eight=0.05

也就是1个是& , 1个是 &amp;
据我所知, 这两个都是and的意思, 这样就产生了两个问题:
1.三态网站好像只能处理&, 不能处理&amp; why?
2.这两处链接都是同一文件sfc.php生成的, 为什么出现两种and表达方法?

敬候JACK大侠再现江湖
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-04-04 21:11

http://www.cftea.com/c/2007/05/SN96SU2UZ1L8ZG4F.asp



刚刚狗到了这篇文章, 这里面说得很明白, &amp;这个是HTML文本使用的, 不能用于URL中, URL中只能用&, 那现在好像上面第一问题是有答案了, 第二个问题静待JACK老大出招 :D
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-05-04 10:50

JACK老大 , 这几天 运费插件又不能用了, 我知道这个不是插件本身的原因, 不过能不能请老大帮忙找找原因:

现像如下:
1. 开始能访问自己的网站, 但在进入选择运费页面要很久, 而且最后也返回空白的运费; 过了半个到1个小时左右网站就会被中国电信的页面拦截, 通过代理进入自己网站的前台, 有时能出运费, 有时不能, 很不稳定, 很慢:CACHE目录下出现大量的同样错误 (这样的问题, 每隔几天就会出现, 有时每天都会出现时间不等的几次, 有时即使能访问网站, QQ邮箱不能和GODADDY的域名邮箱连接, 无法收发信, 过一阵子又好了, 不知道是电信的原因, 还是GWF?):
[03-May-2012 10:58:41] PHP Warning: DOMDocument::load(http://www.sendfromchina.com/shipfee/ou ... eight=0.02) [<a href='domdocument.load'>domdocument.load</a>]: failed to open stream: Connection timed out in /***/includes/modules/shipping/sfc.php on line 99

[03-May-2012 10:58:41] PHP Warning: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: I/O warning : failed to load external entity &quot;http://www.sendfromchina.com/shipfee/out_rates?country=Brazil&amp;weight=0.02&quot; in /***/includes/modules/shipping/sfc.php on line 99

不知道能不能通过给插件加代理服务器的办法解决这些不稳定的问题?


2..上面错误提示中的&都被自动转义成了&amp; 三态的网站不能处理包含这种转义字符的请求, 这个会不会是一个问题? 能不能阻止被自动转义?
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-05-15 22:10

JACK老大,SOS !!!

现在插件完全不能用了, 我的CACHE目录一天有几十条前面贴子中的错误, 这边封网很厉害. 可能godaddy已经完全屏了

能不能让插件通过代理服务器向三态网站发起请求? 并且在后台可以设置代理服务器IP?

zhanghao162兄弟, 你现在能正常用吗, 有空你也要检查一下cache目录
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-05-15 22:17

JACK老大,SOS !!!

现在插件完全不能用了, 我的CACHE目录一天有几十条前面贴子中的错误, 这边封网很厉害. 可能godaddy已经完全屏了, 导致godaddy主机不能直接向三态网站提交请求

能不能让插件通过代理服务器向三态网站发起请求? 并且在后台可以设置代理服务器IP?

zhanghao162兄弟, 你现在能正常用吗, 有空你也要检查一下cache目录
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

Re: 三态物流接口模块

帖子li-he-qi » 2012-05-16 12:53

最好是能让插件自己判断, 查询时超过多少秒联不上三态网站就重新从代理服务器发出请求 :D

如果JACK老大没时间的话, 敬请指点一下, 我说的这些从理论上来讲是否可行, 是否很复杂?

老大我是愿意付费的, 说实话这插件是中文运费插件中唯一好用简单的一个, 要是这个不能用了, 那我的网站基本就是一个摆设了
li-he-qi
高级会员
高级会员
 
帖子: 103
注册: 2010-09-22 22:47

上一页下一页

回到 精华共享

在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客