wget - webcron authentification website cakephp -


on site cakephp website have action allows me processing , send email going specific url: www.example.com/users/dofacture/true

i want create scheduled task automatically goes url once month. problem access need authenticate myself. have tried following script:

# log in server.  can done once. wget --save-cookies cookies.txt --keep-session-cookies --post-data="[user][username]=xxxx&[user][password]=yy" ww.example.com/identification # grab page or pages care about. wget --load-cookies cookies.txt -p ww.example.com/users/dofacture/true 

but not work, when receive report of scheduled task have this:

the task scheduler has completed scheduled task.

task: email heure de début : sun, 26 mar 2017 23:49:23 gmt heure d’arrêt : sun, 26 mar 2017 23:49:25 gmt État actuel : 8 sortie standard/erreur : --2017-03-26 23:49:23-- www.example.com/identification resolving www.example.com... xx.xx.xxx.169 connecting [http://www.example.com|xx.xx.xxx.169...xx.xxx.169|:80... connected. http request sent, awaiting response... 200 ok length: unspecified [text/html] saving to: 'identification.6'

0k ......... 16.2m=0.001s

2017-03-26 23:49:24 (16.2 mb/s) - 'identification.6' saved [9376]

--2017-03-26 23:49:24-- hwww.example.com/users/dofacture/true resolvingwww.example.com... xx.xx.xxx.169 connecting [http://www.example.com|xx.xx.xxx.169...xx.xxx.169|:80... connected. http request sent, awaiting response... 302 found location: www.example.com/identification [following] --2017-03-26 23:49:24-- www.example.com/identification reusing existing connection www.example.com:80. http request sent, awaiting response... 200 ok length: 3044 (3.0k) [text/html] saving to: 'www.example.com/users/dofacture/true'

0k .. 100% 60.3m=0s

everything seems ok... never receive mail following url supposed send me: www.example.com/users/dofacture/true

of course when go through explorer , authenticate go address, works.

do have idea ? possible / advice use curl?

thanks in advance;


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -