Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
  1. #1
    Senior Member
    Join Date
    Aug 2011
    Posts
    227
    Member #
    29153
    Liked
    4 times
    I need to copy images I am using through an affiliate to my own site. Is there a code I can use to do this? I know how to grab the image url, but once I do, can this be done by building a php code or anything?

    Basically, I am wanting to download it from one site to another.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    Does the other site allow hot-linking? Some sites don't allow that.
    And not necessarily linking, but using a PHP script to load their image.


  4. #3
    Senior Member
    Join Date
    Aug 2011
    Posts
    227
    Member #
    29153
    Liked
    4 times
    Huh?

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    Glenn ... Provide a URL to an image you would like to copy.
    That might be the best way for me to describe it. I'll provide an example.


  6. #5
    Senior Member
    Join Date
    Aug 2011
    Posts
    227
    Member #
    29153
    Liked
    4 times

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Here's a code sample I use in ASP for the exact thing you're talking about. I use it to harvest images from 3-4 sites for the purposes of redisplaying them on my site. This code probably could be tweaked and cleaned up a bit, but I don't care because it works and I only use it about once every 3-4 months:
    Code:
    function GatherRemoteImage (byVal Img_Link)
    
        Dim XML_HTTP
        Error_Flag = false
        on Error Resume Next
        set XML_HTTP = CreateObject("MSXML2.ServerXMLHTTP")
        XML_HTTP.open "GET", Img_Link, false
        if Err.Number = 0 then
            XML_HTTP.send ""
            GatherRemoteImage = XML_HTTP.responseBody
            set XML_HTTP = nothing
        end if
        if Err.Number <> 0 then
            Error_Flag = True
            Err.Clear
        end if
        on error goto 0
    
    end function
    
    sub StoreImage (byVal Image, byVal Filename)
    
        Dim Binary_Stream
        if not Error_Flag and not IsNull (Image) then
            set Binary_Stream = Server.CreateObject("ADODB.Stream")
            Binary_Stream.Type = 1
            Binary_Stream.Open
            Binary_Stream.Write Image
            Binary_Stream.SaveToFile Filename, 2
            set Binary_STream = nothing
        end if
    
    end sub
    Now, before anyone jumps down my throat, I do actually have written permission from the sites I take the images from. This is going to be the other half of your equation, Glenn...you've got 50% technical to worry about, 50% legal.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Senior Member
    Join Date
    Aug 2011
    Posts
    227
    Member #
    29153
    Liked
    4 times
    I'm selling these things for them so it shouldn't matter. I'm only using them for this purpose. That was my account you looked at and I will be placing them on luv2kayak.com for this use.

    I appreciate your help and will be looking at this code and see if I can tweak it to fit my needs on this and a few other things.

    Thanks

  9. #8
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Ok... Not sure I'm quite understanding... If you're selling these things for them... Wouldn't they provide you with either the images... Or a location to pull them from ?

    Some of my clients do run online stores and occasionally list products from other sites for a % of the sales... But I think they all get a list of image locations ( not the main site ), and an affiliate ID for the pull string, so not only is the company providing the images eating the cost on bandwidth... But they can also keep track of how many views my clients actually are getting on their products...

    Thier main site is typically blocked from hot linking and all the images have semi transparent watermarks on them... But they have a shared image repository for the people that list their products on other sites ( again with an affiliate ID associated in the request )...

    Guess I'm just wondering out loud.

    When I review log files every month.. One of the things I look at are my image directories... To see if anyone is hot linking ( basically letting me pay for the bandwidth of images they are using )... If I see a spike in some image request... I don't bother with tracking them down... I just rename the image... And that's that... Sometimes I do replace it with something off the wall ( for a little fun )... But most of the time I just let their image be broken.

  10. #9
    Senior Member
    Join Date
    Aug 2011
    Posts
    227
    Member #
    29153
    Liked
    4 times
    I have added this code to a page but now not sure what I am supposed to do with it.

  11. #10
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Webzarus: a lot of manufacturers/wholesalers simply don't have anything set up for this purpose. A lot of lower-end manufacturers of fireplace accessories don't, for example...they simply don't care. Now, we can sit here and discuss the philosophy about it and why it's stupid (which it is), but it's not going to help get those picture. You can get them to mail CDs or DVDs, but even that's a hassle because they don't know how to burn their images because "I have a brother-in-law who's good with computers but he works for another company full-time and he's only in for three hours on the Saturdays that have a full moon in them on months that have a Friday the 13th in them."

    So I tell the manufacturers what I have in mind...ask permission...and get it. Much easier, they don't mind/care, and I get what I want and can run my spiders whenever I feel like.

    Glenn: first of all, that's ASP code. So you'll need a server that supports ASP. Second, that code is only going to download an image that you supply it and save it on a spot on your server that you delegate for this purpose (note: the directory you save it to will require write permissions or it won't work). So what you're going to have to do with it is figure out how to read the images that you want from that luv2kayak.com site, save them to files, and then any other processing you might want to do. That sub and function come from a page that contains approximately 1000 lines of customized spider code, so for me to post the rest of it would both be far too much to read and irrelevant to what you're doing.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

codes for copying images from other sites

,

how can i copy an image from one site to another

,

how to copy from one site to another with picture

,

howtocopyimagefromanothersite

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:26 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com