Scrape den Inhalt einer Site mit einem sicheren Login

Ich versuche, den Inhalt einer Website mit gesicherter Anmeldung zu löschen, kann dies jedoch nicht. Die Anmeldung der Website hat drei Optionen: Benutzername, Passwort, Passcode. Hierbei handelt es sich um den von mir verwendeten Code

<?php

// HTTP authentication

$url = "http://aftabcurrency.com/login_script.php";

$ch = curl_init();    

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

curl_setopt($ch, CURLOPT_URL, $url); 
$cookie = 'cookies.txt';
$timeout = 30;
curl_setopt($curl, CURLOPT_TIMEOUT,         10); 
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT,  $timeout );
curl_setopt($curl, CURLOPT_COOKIEJAR,       $cookie);
curl_setopt($curl, CURLOPT_COOKIEFILE,      $cookie);

curl_setopt ($ch, CURLOPT_POST, 1); 
curl_setopt ($ch,CURLOPT_POSTFIELDS,"user_name=user&user_password=pass&passcode=code");             

$result = curl_exec($ch); 

curl_close($ch); 

echo $result;

?>

Antworten auf die Frage(2)

Ihre Antwort auf die Frage