Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question about taking an image off of another website.

    Ok, Let me try to explain this as best as I can

    There is a multiplayer internet game called maplestory. And on this game you create avaters (your characters) and fight bad guys. Well they have a rankings system on their website Here What it does is show your characters avater that you created and your characters level.

    Anyway there is a fansite for this game. www.basilmarket.com, Where you can sell your items on the game in auctions just like ebay,

    Anyway the question is when you sign up to this fansite they gave you an option to upload your own character picture, or there is another option so that the website automically retrives your character picture just by typing your name from the offical ranking page.

    How does this work? Is this something simple that I am not understanding or is it very complicated code.

    Someone please help or tell me if you dont understand! Thanks!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Quote Originally Posted by jimread View Post
    Ok, Let me try to explain this as best as I can

    There is a multiplayer internet game called maplestory. And on this game you create avaters (your characters) and fight bad guys. Well they have a rankings system on their website Here What it does is show your characters avater that you created and your characters level.

    Anyway there is a fansite for this game. www.basilmarket.com, Where you can sell your items on the game in auctions just like ebay,

    Anyway the question is when you sign up to this fansite they gave you an option to upload your own character picture, or there is another option so that the website automically retrives your character picture just by typing your name from the offical ranking page.

    How does this work? Is this something simple that I am not understanding or is it very complicated code.

    Someone please help or tell me if you dont understand! Thanks!

    There is no simple answer for this one.
    First, it depends on what information you'd provide the fansite. Next, it depends on the level of control the fansite has over the primary site. If they have a lot of control it can easily retreive the information from the database.
    After that, the primary site may have web services set up that allow any user(s) to retrieve this information from their database.
    The last resort option would be to scrape the target site (which is often considered unethical).
    There are tons of ways to faciliate data movement between sites, it just depends on what the target site owner is willing to provide and what the requesting site needs.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the quick response,

    Ok when you say how much control the fansite has? Do you mean if the OFFICAL game website allows the fansite to access their databases? Because I am pretty sure they don't. And all you supply to this fansite is your game username and then the magic happens... lol

    Does it sound possible that the fansite finds the url to your picture on the offical site somehow then saves that image and uploads it to their server in about 1 second or am I just talking like a noob and not know what im saying.

    And The last resort option would be to scrape the target site (which is often considered unethical). , Does this mean to use a program to download the source of the fansite and find the code whee this is happeing? And is this illegal...

    Sorry if my noob langauge is annoying.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    The ease of doing this all depends on how the official site handles the requests for it. They may very well have an image handler or web service that generates images based off of login names, which would make it very easy to copy.

    Scraping is to the best of my knowledge not illegal, its just considered to be unethical (specifically because of all the phishing problems out there right now). It is possible that the fan site scrapes the data off of the loaded page of a user, which is only likely if its a publically viewable page (does not require a login or authentication to view). They may do this with our without the consent of the official site. Scraping is quite fast, and could be done in very little time. This is only possible if the user's information can be generated by a provided name and not by an id.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm... Well I just checked on the offical rankings site and the images URL's come out like

    http://msavatar1.nexon.net/Character...OJIENEAFHL.gif

    lol so I am guessing they are encrypted or something... And maybe change everytime y our characters clothing / equipment changes. Anyway I also tried to take the source off of the fansite for the last three days with no luck what so ever... I also tried emailing the fansite asking if they would sell me their script and I got no response... LOL maybe I should just forget about using this on my website. And find a different solution.

  • #6
    New Coder
    Join Date
    Mar 2009
    Posts
    52
    Thanks
    4
    Thanked 6 Times in 6 Posts
    It's probably not that hard to do. If it's not obvious how the images are named, then it's probably pulled by scraping. The idea would be that you can submit a http request with a php script. So, you use your php script to 'submit' a search request with the login name of the person you want to get the avatar of. Their website returns the page that has your rank on it, along with the username and their profile image. This returned page gets saved in a string inside your php script. Then, using various string operations and regular expressions, you can find the <img> tag associated with the username you're looking for, extract the src='' part from the <img> tag, and then the script can request that image and save it to your server. That's the idea anyway.

    Anyway I also tried to take the source off of the fansite for the last three days with no luck what so ever.
    Just to be clear, there is no way to get the php source off a website short of hacking into their servers. Unless they are using some simple javascript to get the images (unlikely), there is no way for you to get the code off their website.


  •  

    Posting Permissions

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