loadpicfromjpeg and remote picture

This is a discussion on loadpicfromjpeg and remote picture within the PHP Language forums, part of the PHP Programming Forums category; Is there a way to load a jpeg (loadpicturefromjpeg from gd library) from remote location? (I need to find out ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-22-2005
B.r.K.o.N.j.A.
 
Posts: n/a
Default loadpicfromjpeg and remote picture

Is there a way to load a jpeg (loadpicturefromjpeg from gd library) from
remote location? (I need to find out the height and width of a picture that
is residing on another server...)

Best regards,

Brko


Reply With Quote
  #2 (permalink)  
Old 04-22-2005
rovisoft
 
Posts: n/a
Default re:loadpicfromjpeg and remote picture

You can try to save that pic into a temporary folder and then apply
the http://www.php.net/getimagesize( getimagesize function) which
will return width, height, type and attributes of that image!

Ovidiu

http://www.DevPlug.com --Connecting Developers
Posted from: http://www.devplug.com/ftopic24067.htm
Reply With Quote
  #3 (permalink)  
Old 04-22-2005
B.r.K.o.N.j.A.
 
Posts: n/a
Default Re: re:loadpicfromjpeg and remote picture

Yes, but how to get the picture (via fopen?) Also there's a performance
issue, since I would have to get the picture once from server with pictures
to server running script and then that same picture would be sent to
browser. Any ideas?

Best regards,

Brko


Reply With Quote
  #4 (permalink)  
Old 04-22-2005
rovisoft
 
Posts: n/a
Default re:loadpicfromjpeg and remote picture

Yes, you can use fopen to open that file and then write the content to
the one on server!
But i think you may have another option, you can get the image
height and width using javascript and this will resolve your server
load, the image will be called directlly from the user browser from
the other server, and with the javascript code you can get what you
need!
I found a good example of where you can start with the javascript:
http://www.aspandjavascript.co.uk/ja...dth_height.asp

Ovidiu

http://www.DevPlug.com --Connecting Developers
Posted from: http://www.devplug.com/ftopic24067.htm
Reply With Quote
  #5 (permalink)  
Old 04-22-2005
B.r.K.o.N.j.A.
 
Posts: n/a
Default Re: re:loadpicfromjpeg and remote picture

Thank you very much, I think that this is THE solution.

Best regards,

Brko


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0