サイト http://example.com ユーザー scott パスワード tiger123 のダイジェスト認証のページへのアクセス方法です。 #! /usr/bin/php <?php $ch = curl_init("http://example.com"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); curl_setopt($ch, CURLOPT_USERPWD, "scott:tiger123"); $response = curl_exec($ch); curl_close($ch); ?> #! /usr/bin/python # -*- coding: utf-8 -*- # # Sep/24/2017 # --------------------------------------------------