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.
 

IGB detection

Author
Louis Vitton
Viziam
Amarr Empire
#1 - 2011-11-28 01:35:07 UTC
Hey guys,

Is there a way to detect weather or not someone is in the IGB i am new to programming so any help here would be of great assistance to me.

Cheers :)
Talaan Stardrifter
Malevelon Roe Industries
Convocation of Empyreans
#2 - 2011-11-28 01:39:06 UTC
Simplest form is:
Request.Params.UserAgent.EndsWith("EVE-IGB")

(YMMV depending on your language)
Louis Vitton
Viziam
Amarr Empire
#3 - 2011-11-28 01:41:08 UTC
Talaan Stardrifter wrote:
Simplest form is:
Request.Params.UserAgent.EndsWith("EVE-IGB")

(YMMV depending on your language)


Thank you for the quick reply.

If i wanted to do this in javascript would you mind should me an example i find them very easy to work off.
Also might be noob but by language i guess you meant programming one otherwise english.

Cheers Louis
Cyna
CynaCorp
#4 - 2011-11-28 01:41:19 UTC  |  Edited by: Cyna
Louis Vitton wrote:
Hey guys,

Is there a way to detect weather or not someone is in the IGB i am new to programming so any help here would be of great assistance to me.

Cheers :)


Check for the EVE_ headers...

In PHP that would be:
function eveHeaders($aIn = '') { //Written by Cynagen (cynagen@cynagen.com)
if (!is_array($aIn)) { $aIn = $_SERVER; }
foreach ($aIn as $k => $v) {
if (is_array($v)) { array_walk_recursive($v, create_function('$value, $key, $out', 'if ($tmp=strstr($key,"HTTP_EVE_")) { $out[str_replace("HTTP_EVE_","",$tmp)]=$value; }'), &$aOut); }
else {
if ($tmp=strstr($k,"HTTP_EVE_")) { $aOut[str_replace("HTTP_EVE_","",$tmp)]=$v; }
}
}
return $aOut;
}
$_EVE=eveHeaders();

Yeah, I don't check if it's the EVE-IGB, anything can spoof so I just care about the headers cause there's at least 1 header that's ALWAYS present in an IGB, and that's HTTP_EVE_TRUSTED, which you can get from my script using $_EVE["TRUSTED"]

Love EVE, love the environment, (most of) the players, and the programming! My projects: EVE POP3 Mail Service

Louis Vitton
Viziam
Amarr Empire
#5 - 2011-11-28 01:44:08 UTC
Thank you very much that's exactly what i need.
Louis Vitton
Viziam
Amarr Empire
#6 - 2011-11-28 20:23:19 UTC
Hey mate,

Just attempting to use the fucntion you have above.

Few questions,

What will it return if true???? (in IGB)

What will it return if false???? (not in IGB)

Cheers Louis
Talaan Stardrifter
Malevelon Roe Industries
Convocation of Empyreans
#7 - 2011-11-29 02:52:44 UTC
Louis Vitton wrote:
Talaan Stardrifter wrote:
Simplest form is:
Request.Params.UserAgent.EndsWith("EVE-IGB")

(YMMV depending on your language)


Thank you for the quick reply.

If i wanted to do this in javascript would you mind should me an example i find them very easy to work off.
Also might be noob but by language i guess you meant programming one otherwise english.

Cheers Louis


Correct, I meant your programming language (C#, php, etc)
Which are you using, by the way?
Cyna
CynaCorp
#8 - 2011-11-29 06:09:55 UTC
Louis Vitton wrote:
Hey mate,

Just attempting to use the fucntion you have above.

Few questions,

What will it return if true???? (in IGB)

What will it return if false???? (not in IGB)

Cheers Louis


Easy way to check in PHP if you're in IGB is to run my function and then call this:

if (isset($_EVE["TRUSTED"])) { //We're in an IGB }
else { //We're not in an IGB }

Love EVE, love the environment, (most of) the players, and the programming! My projects: EVE POP3 Mail Service

Louis Vitton
Viziam
Amarr Empire
#9 - 2011-11-30 04:15:10 UTC  |  Edited by: Louis Vitton
Cyna wrote:
[quote=Louis Vitton]

Easy way to check in PHP if you're in IGB is to run my function and then call this:

if (isset($_EVE["TRUSTED"])) { //We're in an IGB }
else { //We're not in an IGB }


I tried the example above and it always returned not in the IGB even when i was.

. it alwasy returned not in game


$message = " "

if (isset($_EVE["TRUSTED"])) { //We're in an IGB
$message = "In game";
}
else { //We're not in an IGB
$message = " Not in game
}

echo $message