[PHP] getimagesize() with ftp-url?

2002-10-13 Thread Stefan Wessman

Hi!

Can anyone tell me if the getimagesize() function is supposed to work with
ftp-url's?
The PHP Manual states URL support was added in PHP 4.0.5, but maby that is
supposed to mean http-url's only?

The following is an expample of how i would like to be able to use
getimagesize():

?php
$size =
getimagesize(ftp://user:[EMAIL PROTECTED]/pictures/image.jpg;);

echo 'pre';
print_r($size);
echo '/pre';
?

This code yields the following errors in my log:

[12-Oct-2002 23:32:14] PHP Warning:  getimagesize(): php_hostconnect:
connect failed in getimagesize.php on line 2
[12-Oct-2002 23:32:14] PHP Warning:  getimagesize(...): failed to create
stream: FTP server reports 227 Entering Passive Mode (194.236.xxx.xxx in
getimagesize.php on line 2

Is this a bug, or is it a missing feature, or maby a documentation issue?
I've tried it on a few different ftp-servers, so i don't think that is the
problem.. but who knows?

Any thoghts would be appreciated.

/OnionMan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: getimagesize() with ftp-url?

2002-10-13 Thread Stefan Wessman

Well, it is remote in the case of http-url's.

Try this code:

?php
 $size = getimagesize(http://www.php.net/gifs/php_logo.gif;);

 echo 'pre';
 print_r($size);
 echo '/pre';
?

And you will see this result:

Array
(
[0] = 120
[1] = 64
[2] = 1
[3] = width=120 height=64
[bits] = 8
[channels] = 3
[mime] = image/gif
)

My point is that it would be nice if the same could be done with an ftp-url.
I don't know if there are any issues that would make this hard to implement,
but if it is possible i think this should be added to complement the
http-url support.

/OnionMan
[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 getimagesize isn't remote.

 --

 Nicos - CHAILLAN Nicolas
 [EMAIL PROTECTED]
 www.WorldAKT.com - Hébergement de sites Internet

 Stefan Wessman [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
  Hi!
 
  Can anyone tell me if the getimagesize() function is supposed to work
with
  ftp-url's?
  The PHP Manual states URL support was added in PHP 4.0.5, but maby
that
 is
  supposed to mean http-url's only?
 
  The following is an expample of how i would like to be able to use
  getimagesize():
 
  ?php
  $size =
  getimagesize(ftp://user:[EMAIL PROTECTED]/pictures/image.jpg;);
 
  echo 'pre';
  print_r($size);
  echo '/pre';
  ?
 
  This code yields the following errors in my log:
 
  [12-Oct-2002 23:32:14] PHP Warning:  getimagesize(): php_hostconnect:
  connect failed in getimagesize.php on line 2
  [12-Oct-2002 23:32:14] PHP Warning:  getimagesize(...): failed to create
  stream: FTP server reports 227 Entering Passive Mode (194.236.xxx.xxx in
  getimagesize.php on line 2
 
  Is this a bug, or is it a missing feature, or maby a documentation
issue?
  I've tried it on a few different ftp-servers, so i don't think that is t
he
  problem.. but who knows?
 
  Any thoghts would be appreciated.
 
  /OnionMan
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php