Perl getprint() returns nothing

时间:2016-02-12 21:34:56

标签: perl web hosting server-side

Sorry, I'm new to Perl, however, this seems really weird to me.

The point is: I have a perl script with this content:

select Total = isnull(RES.Total,0),
       Summ = isnull(RES.Summ,0 ),
       Status = S.Status_Site
from Status_Mapping S
outer apply (
     select Total = count(*), Summ = sum(LT.Rate)
     from Lead_Instance LI
     join Lead_transaction LT 
          on LT.Lead_transaction_id = LI.Lead_transaction_id
     where LT.Status = S.Status
     and LI.product_id = 6 
     and LI.affiliate_id = 10 ) RES

And I host it on some domain. The point is that it does work with every domain I enter except for my domain and the domain of the hosting company (including their service domains like those for admin tools and so on)...

I'm really confused with that, no idea what I'm doing wrong

1 个答案:

答案 0 :(得分:0)

你应该为第一个修改你的脚本,使用某种" try-catches"或者"死(...)如果......"结构,如果你的脚本在更多的域上工作,而不在你的或某些域上工作,那就意味着他们不喜欢爬虫:-)。有很多方法可以做一些解决方法,尝试识别你的脚本抛出LWP就像一些"浏览器" (你需要在www'中有很多例子,第二个想法是 - 首先使用一些普通的PC作为客户端,因为你的服务器ip可能会禁止我的一些黑名单,但这不太可能。

使用LWP; my $ userAgnt = LWP :: UserAgent-> new;

打印"内容类型:text / html \ n \ n";

死亡"没有成功: - ("除非定义$ userAgnt-> get(" DOMAIN");

$ userAgnt-> getprint(" DOMAIN /&#34);

if(is_success($ userAgnt-> getprint(" DOMAIN"))){      ...  }

干杯。