LoginSignup
50

More than 5 years have passed since last update.

wgetでログイン認証の先のページを落とす

Posted at

BASIC認証じゃなくて、普通にphpでログインとかの場合。

一旦クッキーを取得しておく。

wget --keep-session-cookies --save-cookies=cookies.txt --post-data 'user_id=muname&password=12345' http://hoge/login.php

そしたら落としたいページを指定。

wget --load-cookies cookies.txt -r -k -E  http://hoge/app

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
50