Mailinglisten-Archive |
This is a multi-part message in MIME format. ------=_NextPart_000_000D_01BFFF15.A902EAC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi also alle einigerma=DFen verst=E4ndlichen FileSizeScripte funktionieren = bei mir nicht, wie z.b. function getfilesize($server, $filename){ $fp =3D fsockopen($server,80,&$errno,&$errstr); if (!$fp) { echo "error $errstr ($errno)<br>\n"; } else { fputs ($fp, "HEAD $filename HTTP/1.0\n\n"); fputs($fp,"HEAD ".$filename." HTTP/1.0\nHost: ".$server."\n\n"); while (!feof($fp)) { $test =3D sprintf("%s%s", $test, fgets ($fp,128)); } print $test; if(strpos ($test, 'Content-Length:') > 0) { $pos =3D strpos ($test, 'Content-Length:'); $pos2 =3D strpos ($test, 'Connection:'); $size =3D substr($test, $pos + 15, $pos2 - $pos - 15); print $size; } fclose ($fp); } return $size; } liefert nur fehler ... ich mu=DF es unbedingt hinbekommen da=DF ich die filegr=F6=DFe von = zip=B4s, rar=B4s u.a. files auf allen m=F6glichen servern ( geocities, = fortunecities,xoom ... ) auslesen kann oder zumindest bestimmen kann , = ob die file =FCberhaupt existiert. Wer hat da ein FUNZENDES Script ?? BIG THANKS Tobias Webmaster of Traffic-Eye ( http://cgi-bin.spaceports.com/~traffeye/ ) ------=_NextPart_000_000D_01BFFF15.A902EAC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>hi</FONT></DIV> <DIV><FONT face=3DArial size=3D2>also alle einigerma=DFen = verst=E4ndlichen=20 FileSizeScripte funktionieren bei mir nicht, wie z.b.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>function getfilesize($server, = $filename){<BR> =20 <A href=3D"file://$fp">$fp</A> =3D=20 fsockopen($server,80,&$errno,&$errstr);<BR> <A=20 href=3D"file://if">if</A> (!$fp) {<BR> echo = "error $errstr=20 ($errno)<br>\n";<BR> <A href=3D"file://}">}</A><BR> <A = href=3D"file://else">else</A> {<BR> <A = href=3D"file://fputs">fputs</A>=20 ($fp, "HEAD $filename = HTTP/1.0\n\n");<BR> fputs($fp,"HEAD=20 ".$filename." HTTP/1.0\nHost:=20 ".$server."\n\n");<BR> while (!feof($fp))=20 {<BR> $test =3D = sprintf("%s%s",=20 $test, fgets=20 ($fp,128));<BR> }<BR> print= =20 $test;<BR> if(strpos ($test, 'Content-Length:') = > 0)=20 {<BR> $pos =3D = strpos=20 ($test,=20 'Content-Length:');<BR> &n= bsp;=20 $pos2 =3D strpos ($test,=20 'Connection:');<BR> = $size=20 =3D substr($test, $pos + 15, $pos2 - $pos -=20 15);<BR> <A=20 href=3D"file://print">print</A> = $size;<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> fclose = ($fp);<BR> <A=20 href=3D"file://}">}</A><BR> return $size;<BR>}</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>liefert nur fehler ...</FONT></DIV> <DIV><FONT face=3DArial size=3D2>ich mu=DF es unbedingt hinbekommen = da=DF ich die=20 filegr=F6=DFe von zip=B4s, rar=B4s u.a. files auf allen m=F6glichen = servern ( geocities,=20 fortunecities,xoom ... ) auslesen kann oder zumindest bestimmen kann , = ob die=20 file =FCberhaupt existiert.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Wer hat da ein FUNZENDES Script = ??</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>BIG THANKS</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Tobias</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Webmaster of Traffic-Eye ( <A=20 href=3D"http://cgi-bin.spaceports.com/~traffeye/">http://cgi-bin.spacepor= ts.com/~traffeye/</A>=20 )</FONT></DIV> <DIV> </DIV> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_000D_01BFFF15.A902EAC0--
php::bar PHP Wiki - Listenarchive