Cronjob with password protected site (.htaccess)

不问归期 提交于 2019-12-04 04:03:50

You are making a small mistake.

keep the http:// before the url.

You have

admin:pass@http://www.mywebsite.com/test.php

Change it to

http://admin:pass@www.mywebsite.com/test.php

Hope that works.

wget --user admin --password pass http://www.mywebsite.com/test.php

Opens every minutes a website with a htaccess password

*/1 * * * *  wget -O /dev/null --user admin --password pass "http://www.mywebsite.com/test.php" > /dev/null 2>&1

Add auth parameter to url. This works for me when call url directly.

http://yoururl.ext?auth=id:psw

I don't know how much secure it is...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!