webcron authentification网站cakephp

时间:2017-03-28 14:19:45

标签: cakephp wget webcron

在我的网站CakePHP网站上,我有一个操作,允许我进行处理,然后通过转到特定的URL发送电子邮件:www.example.com/Users/doFacture/true

我想创建一个计划任务,每月自动转到该URL一次。问题是要访问它我需要验证自己。 所以我尝试了以下脚本:

# Log in to the server.  This can be done only once.
wget --save-cookies cookies.txt --keep-session-cookies --post-data="[User][username]=xxxx&[User][password]=yy" ww.example.com/identification
# Now grab the page or pages we care about.
wget --load-cookies cookies.txt -p ww.example.com/Users/doFacture/true

但它不起作用,当我收到我的预定任务的报告时,我有这个:

  

任务计划程序已完成计划任务。

     

任务:EMAIL Heurededébut:2017年3月26日星期日23:49:23 GMT Heure   d'arrêt:太阳,2017年3月26日23:49:25GMTÉtatactel:8 Sortie   标准/错误:   --2017-03-26 23:49:23-- www.example.com/identification解析www.example.com ... xx.xx.xxx.169正在连接到   [http://www.example.com|xx.xx.xxx.169...xx.xxx.169|:80 ...已连接。   发送HTTP请求,等待响应... 200 OK长度:未指定   [text / html]保存到:'identification.6'

     

0K ......... 16.2M = 0.001s

     

2017-03-26 23:49:24(16.2 MB / s) - 'identification.6'已保存[9376]

     

- 2017-03-26 23:49:24-- hwww.example.com/Users/doFacture/true Resolvingwww.example.com ... xx.xx.xxx.169正在连接到   [http://www.example.com|xx.xx.xxx.169...xx.xxx.169|:80 ...已连接。   发送HTTP请求,等待响应... 302找到位置:   www.example.com/identification [关注]   --2017-03-26 23:49:24-- www.example.com/identification重新使用www.example.com:80的现有连接。 HTTP请求已发送,等待   响应... 200 OK长度:3044(3.0K)[text / html]保存到:   'www.example.com/Users/doFacture/true'

     

0K .. 100%60.3M = 0s

一切似乎都没问题......但是我从未收到以下网址应该发送给我的邮件:www.example.com/Users/doFacture/true

当然,当我浏览我的资源管理器并进行身份验证时,请转到此地址,它可以正常工作。

你知道吗?是否有可能/建议使用卷曲?

提前致谢;

0 个答案:

没有答案