These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Image Server Requests

Author
Dex Thiesant
Concordiat
#1 - 2012-12-02 23:02:14 UTC
Hey All,

I'm working on a website where I'd like to show the corp image if it's available, and if it's not then show a default image.

My current thought process is to do this:

&lt img src="http://image.eveonline.com/Corporation/{corpID}_{size}.jpg" onerror="javascript:LoadDefaultImage()" &gt

My only concern is that this may be considered an invalid request by CCP and if I make too many of them then I'll have my IP banned.

I'm sure someone has done something along these lines before, so I just wanted to see what the other solutions were. I just started working with the Eve API so I'm not 100% up to speed with everything that is available to me. I just want to make sure my IP doesn't get banned.

Thanks,

Dex
Dex Thiesant
Concordiat
#2 - 2012-12-02 23:23:35 UTC
Actually, please ignore.

Quote:
If a given image is not found in the database, the service responds with a 302 Moved HTTP response and redirects the HTTP client to a generic image. If you request an image in an invalid size, you get a plain 404.


So if I make a request for an image that DNE then CCP will give me a default image.

It's amazing the things you find out when you actually read things completely lol.

Dex
xHjfx
The Legion of Spoon
Curatores Veritatis Alliance
#3 - 2012-12-03 06:07:18 UTC
Dex Thiesant wrote:
Actually, please ignore.

Quote:
If a given image is not found in the database, the service responds with a 302 Moved HTTP response and redirects the HTTP client to a generic image. If you request an image in an invalid size, you get a plain 404.


So if I make a request for an image that DNE then CCP will give me a default image.

It's amazing the things you find out when you actually read things completely lol.

Dex


I think the banning regards the actual API server and it gives you a warning to slow down/reduce your invalid requests before you get to that point.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2012-12-03 10:20:47 UTC
Dex Thiesant wrote:
Hey All,

I'm working on a website where I'd like to show the corp image if it's available, and if it's not then show a default image.

My current thought process is to do this:

&lt img src="http://image.eveonline.com/Corporation/{corpID}_{size}.jpg" onerror="javascript:LoadDefaultImage()" &gt

My only concern is that this may be considered an invalid request by CCP and if I make too many of them then I'll have my IP banned.

I'm sure someone has done something along these lines before, so I just wanted to see what the other solutions were. I just started working with the Eve API so I'm not 100% up to speed with everything that is available to me. I just want to make sure my IP doesn't get banned.

Thanks,

Dex



One thing:

/You/ wouldn't be making invalid requests. The people using your site would. They're the ones downloading the image to show. you're just hyperlinking it. And you can't use the referrer as gospel for where a request comes from. It's /simple/ to spoof.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Desmont McCallock
#5 - 2012-12-03 19:24:50 UTC
Btw Corp images are PNG. ONLY character is JPG.
Dex Thiesant
Concordiat
#6 - 2012-12-03 20:40:04 UTC
Desmont McCallock wrote:
Btw Corp images are PNG. ONLY character is JPG.


Haha, yeah I caught that after the post and forgot to update. Thanks though!

Thanks all for the info. Much appreciated.