Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 26-07-05
pricethat's Avatar
data muncher
 
Join Date: Sep 2004
Location: Berlin
Posts: 2,485
Thanks: 0
Thanked 0 Times in 0 Posts
pricethat is an unknown quantity at this point
  dynamic image problem

wondered if anyone else can help or has the same problems, we basically inport images onto our server from the networks data feeds. Once imported we use the GD library (well something similar) to reprocess the images into correct thumbnail sizes to keep our site consistent. Problem is that merchants are using urls like:

http://www.avonshop.co.uk/getimg.asp...n=ProductImage

for example, which is not a file path to an actual image, its a file path to ascript which outputs an image, quite different when trying to import an image.

Does anybody have any clue about what methods we could use to import such an image directly from the server, what commands to use, we cant use a get command on this type of image and also even when we do its not clear what the file type is to allow our script to reprocess it, we need clear urls to images and this looks like something we cant get past.

At the moment we are not importing more than 200,000 products because we dont have images for them. (our theory is if we are going to try and sell something to someone the least we can do is show them what the damn thing looks like)

Also im pretty pissed with this whole thing as it shows that the people that either make the files, or the networks themselves have no real understanding how affiliates use the feeds, i have spoken to others about this subject and it is the same for them. Surely if the images are on the server anyway they can provide the real file path to them and not this nonsense scripts all the time.
__________________
Nothing to see here...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 26-07-05
Registered User
 
Join Date: Mar 2004
Location: Reading, UK
Posts: 301
Thanks: 0
Thanked 0 Times in 0 Posts
dmorison is an unknown quantity at this point
If your server is running PHP >= 4.3 you could fetch the file as raw data, use the Magic Mime function to detect the type, and then use the appropriate GD (or equivalent) import function....

PHP Code:
<?php
    $url 
"http://www.avonshop.co.uk/getimg.asp?sid=6732&fn=ProductImage";    
    
$src fopen($url,"r");    
    if (
$src)
    {
         
$dst fopen("tmp/imagedata","w");        
        while(!
feof($src))
        {
            
fwrite($dst,fread($src,1024));
        }        
        
fclose($src);    
        
fclose($dst);
    }
    echo( 
mime_content_type("tmp/imagedata") );        
?>
(tmp/ must be writable by the PHP instance of course). If you don't have PHP > 4.3 could another option be to have a guess at the mime type and just keep trying different import functions until one works?

Merchants should check that their scripts at least return the correct MIME type, and preferably take it a step further and use rewrite software to generate URLs that look like a static image file even if the data is actually pulled from a database.

Last edited by dmorison; 26-07-05 at 11:21 AM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 26-07-05
pricethat's Avatar
data muncher
 
Join Date: Sep 2004
Location: Berlin
Posts: 2,485
Thanks: 0
Thanked 0 Times in 0 Posts
pricethat is an unknown quantity at this point
Thanks for the help, is most kind of you, i'm appalled at the feed quality in general, i think for the most part the merchants and networks have no real understanding of how these feeds are even used..

When i first started this i thought easy import job, now after more than 100 rules later and god knows how many data correction scripts im still having minor problems.

I did manage to play clever and add a perameter to the end of these urls like &imagetype=.jpg and .gif and .png which was enough to fool the import scripts but it took so long to do an import if was getting a joke so will give your way a try.

Still i guess it will be worth it in the end , thanks for the help, will reciprocate when i get the opportunity.
__________________
Nothing to see here...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 26-07-05
Registered User
 
Join Date: Jul 2005
Location: North Devon
Posts: 664
Thanks: 0
Thanked 2 Times in 2 Posts
futureweb is an unknown quantity at this point
I think the reason behind it is so they can change product images on a global scale without everyone downloading the csv over and over.

Superb soloution though nice and slick with php would of had a lot more lines in asp to get the same result.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
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
Image URL's in datafeeds B1gJo3 The Affiliate Marketing Lounge 12 14-10-07 05:45 PM
Dynamic content unit problem Jacqui Commission Junction - CJ UK 1 05-05-05 01:00 PM
Mouseover on sections of an image Wardy Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 9 21-03-05 06:33 PM
how to display image as image not as blabla.com/pic.jpg via phpMyadmin & Dreamweaver Matt Seigneur Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 5 17-12-04 12:39 PM
Detecting Broken Image Links darrenw Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 8 15-04-04 11:56 AM


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

Content Relevant URLs by vBSEO 3.2.0 RC7