phpbar.de logo

Mailinglisten-Archive

[php] Zugrif auf gesch�tzte Seite

[php] Zugrif auf gesch�tzte Seite

Achim Fink achim at aff-web.de
Son Sep 10 00:25:53 CEST 2006


Hallo Liste

 

Ich wies dieses Thema wurde erst k�rzlich behandelt, aber ich habe immer
noch ein Problem auf eine Seite, die htaccess gesch�tzt ist zuzugreifen.

 

Der letzte versuch war so:

 

<?php

// create a new curl resource

$ch = curl_init();

 

// set URL and other appropriate options

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01;
Windows NT 5.0)");

curl_setopt($ch, CURLOPT_URL, "http://meineDomain.de/");

curl_setopt($ch, CURLOPT_USERPWD, "username:password");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

 

// grab URL, and return output

$output = curl_exec($ch);

 

// close curl resource, and free up system resources

curl_close($ch);

 

// Print output

echo $output;

?>

 

Leider will die Seite trotzdem den Usernamen und Passwort von mir.

 

Wo liegt der Fehler?

 


php::bar PHP Wiki   -   Listenarchive