Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> fopen("https://.... a certyfikat
gizmo
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 10.04.2003

Ostrzeżenie: (0%)
-----


Mam taki skrypt :
[php:1:bfff9b85e1]<?php
// php Headlines Grabber by Neil Moomey, www.neilmoomey.com.
// You are free to use this code as you wish.
// Make sure you get permission from any web sites you grab headlines from.
// You may want to write the headlines to a file on your server to speed things up.

// Grab source code from a file or web site
if(!($myFile=fopen("https://....","r")))
{
echo "The news interface is down for maintenance.";
exit;
}
while(!feof($myFile))
{
// Read each line and add to $myLine
$myLine.=fgets($myFile,255);
}
fclose($myFile);
// Extract everything between start and end. You need to include these lines
//in the headlines or pick some unique substring in the html to mark the start
//and end of the news.
$start="<!-- rekordy -->";
$end="<!-- koniec rekordow -->";
$start_position=strpos($myLine, $start);
$end_position=strpos($myLine, $end)+strlen($end);
$length=$end_position-$start_position;
$myLine=substr($myLine, $start_position, $length);
// Display HTML
echo $myLine;
?>[/php:1:bfff9b85e1]

i wszystko fajnie działa, ale chcąc pobrać treść strony https://... do której trzeba się logować i mieć certyfikat ( mam i usera i cerytfikat ) wylatuje mi błąd :
Kod
[function.fopen]: failed to create stream: HTTP request failed!

Myślę, że problem tkwi w certyfikacie, który mam zainstalowany. Wchodząc przez IE na stronę wszystko jest ok. Jak zrobić żeby php też widziało certyfikat ?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 15:59