Precisa mostrar como você está fazendo.
$ctx = stream_context_create( array( 'http' => array( 'method' => 'GET', 'header' => "login: login\r\n". "senha: senha\r\n" ) ) ); //faz solicitacao e carrega xml $arq = file_get_contents($url, 0, $ctx); if (strpos($http_response_header[0], "200")) { $obj = simplexml_load_string($arq);
ali no header tento fazer a identificação