Affiliate Marketing
Forum Search


Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 25-09-06
Spartacus's Avatar
[yet-to-be] freed slave
 
Join Date: Sep 2006
Location: Sheffield
Posts: 209
Thanks: 0
Thanked 1 Time in 1 Post
Spartacus is an unknown quantity at this point
  Question imagecreatefromjpeg...ing images from other sites

I am trying to read an image from another site using PHP and the GD extension inorder to rescale it and use it as a thumbnail on my site, i.e.

$fullSourceFileName_ = "http://www.example.com/photos/testFront.jpg";

$src_ = ImageCreateFromJPEG($fullSourceFileName_);

... and am getting the following error ...

Warning: imagecreatefromjpeg: Unable to open 'http://www.example.com/photos/testFront.jpg' for reading in c:\apache\htdocs\hfr\_code\php\lib\utilities\class .ImageScaler.php on line 184

Can anyone please help while I still have my own hair
__________________
http://www.tenuouslinks.co.uk (No SEO required)
http://www.rentagaff.co.uk (Search2Let)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 25-09-06
seekituk's Avatar
Registered User
 
Join Date: Jan 2006
Location: Sudbury UK
Posts: 260
Thanks: 0
Thanked 0 Times in 0 Posts
seekituk is an unknown quantity at this point
Hi,

Just a stab in the dark as I've not used the GD image library but could it be something to do with permissions on the directory you are trying to create the image in?

Regards

Jason
__________________
ClickOn Web Design
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 26-09-06
Spartacus's Avatar
[yet-to-be] freed slave
 
Join Date: Sep 2006
Location: Sheffield
Posts: 209
Thanks: 0
Thanked 1 Time in 1 Post
Spartacus is an unknown quantity at this point
Don't think so. It's reading the image that seems to be the problem. Works fine when I read the file from my own server on laptop. Seems it's http that's getting in the way.

Cheers anyway.

Found loads of this problem on web, but no solution.
__________________
http://www.tenuouslinks.co.uk (No SEO required)
http://www.rentagaff.co.uk (Search2Let)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 26-09-06
seekituk's Avatar
Registered User
 
Join Date: Jan 2006
Location: Sudbury UK
Posts: 260
Thanks: 0
Thanked 0 Times in 0 Posts
seekituk is an unknown quantity at this point
Hi,

Had a quick look and found this:

The problem is that the GD extension explicitly disables URL access
under windows (it uses the IGNORE_URL_WIN flag when opening the
stream).

It's discussed at the following URL:

http://bugs.php.net/bug.php?id=18609

Hope this helps

Regards

Jason
__________________
ClickOn Web Design
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 26-09-06
Spartacus's Avatar
[yet-to-be] freed slave
 
Join Date: Sep 2006
Location: Sheffield
Posts: 209
Thanks: 0
Thanked 1 Time in 1 Post
Spartacus is an unknown quantity at this point
Hi

Many thanks. Will look into this tonight.

Think I need to find a way to change this flag from within the script.

Regards


Mel
__________________
http://www.tenuouslinks.co.uk (No SEO required)
http://www.rentagaff.co.uk (Search2Let)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 26-09-06
Spartacus's Avatar
[yet-to-be] freed slave
 
Join Date: Sep 2006
Location: Sheffield
Posts: 209
Thanks: 0
Thanked 1 Time in 1 Post
Spartacus is an unknown quantity at this point
Haaaa

Pretty sure this is impossible. Head done in off to bed. Can't even copy an image from one site/server to another.

Who'd have thought this would be impossible?
__________________
http://www.tenuouslinks.co.uk (No SEO required)
http://www.rentagaff.co.uk (Search2Let)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 26-09-06
Spartacus's Avatar
[yet-to-be] freed slave
 
Join Date: Sep 2006
Location: Sheffield
Posts: 209
Thanks: 0
Thanked 1 Time in 1 Post
Spartacus is an unknown quantity at this point
Ahhhhhggg

Pretty sure this is impossible. Head done in off to bed. Can't even copy an image from one site/server to another.

Who'd have thought this would be impossible?
__________________
http://www.tenuouslinks.co.uk (No SEO required)
http://www.rentagaff.co.uk (Search2Let)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #8 (permalink)  
Old 27-09-06
Lynx's Avatar
Penny wise...!
 
Join Date: Aug 2005
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Lynx is an unknown quantity at this point
Howdy Spartacus

What version of PHP are you using?

Unfortunatly unless you have PHP 4.3.0 or above you can't remote access files via imagecreatefromjpeg (even if allow_url_fopen is enabled).

L.>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 27-09-06
Spartacus's Avatar
[yet-to-be] freed slave
 
Join Date: Sep 2006
Location: Sheffield
Posts: 209
Thanks: 0
Thanked 1 Time in 1 Post
Spartacus is an unknown quantity at this point
You may have cracked it. For development I'm using the Triad PHP MySQL package which I think to stopped at about 4.1

Many thanks for pointing this out.
__________________
http://www.tenuouslinks.co.uk (No SEO required)
http://www.rentagaff.co.uk (Search2Let)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Affiliate site not listed on Dmoz.org here is why! supercod Website Promotion 32 14-03-08 12:31 PM
25 English Football Sms Sites mrkhm Domains & Websites For Sale 4 21-04-06 05:01 PM
Seach Engine Optimisation FAQ [Jan2006] thetafferboy Organic Google Search Optimisation 2 09-01-06 05:11 PM
Using images from other sites goose The Affiliate Marketing Lounge 1 24-11-05 01:43 PM
Images from merchant sites Kaching The Affiliate Marketing Lounge 13 14-08-03 12:47 PM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top