IGB Header
This article explains how to get the header IGB sends along with page requests when your page is trusted, what information is in it and how to ask the browser to request trust from the user.
If you need to know how to trust a webpage using the IGB, or want to know more about trust in general, read
TrustPage.
Getting trust, reading the header
Here's a piece of code you can use to get the header from the IGB, if you're using PHP:
$browser =
$HTTP_SERVER_VARS['HTTP_USER_AGENT'];
$ingame =
(substr($browser,
0,
16)==
'EVE-minibrowser/');
function get_trust
() {
global $ingame,
$trusted,
$pilotname;
if ($ingame) {
// check for trust
if ($_SERVER['HTTP_EVE_TRUSTED']==
'no') {
// request trust from client through headers
header("eve.trustme:".
$this_host.
"/::please allow me to access your pilot information.");
$trusted =
false;
} else {
$trusted =
true;
// get pilotname
$pilotname =
$_SERVER['HTTP_EVE_CHARNAME'];
}
}
}
get_trust
();
Note that the IGB will always send HTTP_EVE_TRUSTED along, regardless if the page is trusted or not. Depending on the value ('yes' or 'no'), you can read the rest of the header variables.
Note that the routine is trying to modify the headers for the page. Depending on the configuration of your webserver, it may start sending headers as soon as you start outputting html from the script. Use
ob_start()
and
ob_end_flush()
in php to buffer output until you're done with the page, or at least until you're done modifying headers.
Information in the header
The following information will be sent along in the header, if the user has your webpage or domain in the trusted sites list.
- HTTP_EVE_TRUSTED
Whether or not the user of the client has trusted your website. ('no'/'yes')
- HTTP_EVE_REGIONNAME
The name of the region the pilot is currently in.
- HTTP_EVE_CONSTELLATIONNAME
The name of the constellation the pilot is currently in.
- HTTP_EVE_SOLARSYSTEMNAME
The name of the solarsystem the pilot is currently in.
- HTTP_EVE_STATIONNAME
The name of the station the pilot is currently docked at. ('None' if undocked)
- HTTP_EVE_CHARNAME
The name of the pilot.
- HTTP_EVE_CHARID
The database id of the pilot, can be used to create showinfo links or get the pilot's portrait.
- HTTP_EVE_ALLIANCENAME
The name of the alliance the pilot is part of. ('None' if not part of an alliance)
- HTTP_EVE_ALLIANCEID
The database id of the alliance the pilot is part of. (0 (unsure) if not part of an alliance)
- HTTP_EVE_CORPNAME
The name of the corp the pilot is part of.
- HTTP_EVE_CORPID
The database id of the corp the pilot is part of.
- HTTP_EVE_CORPROLE
The role of the pilot in his corporation.
- HTTP_EVE_SERVERIP
The IP-address of the EVE-Online server the pilot is using.
- HTTP_EVE_NEARESTLOCATION
The closest celestial object for the pilots location.
The corprole is a bitmask, you can perform a logical and with the following values and it will result in that same value if the bit is set or in 0 if the bit is clear.
| Corprole | Bit |
| Director | 1 |
| Personnel Manager | 128 |
| Accountant | 256 |
| Security Officer | 512 |
| Factory Manager | 1024 |
| Station Manager | 2048 |
| Auditor | 4096 |
| Hangar Can Take Division 1 | 8192 |
| Hangar Can Take Division 2 | 16384 |
| Hangar Can Take Division 3 | 32768 |
| Hangar Can Take Division 4 | 65536 |
| Hangar Can Take Division 5 | 131072 |
| Hangar Can Take Division 6 | 262144 |
| Hangar Can Take Division 7 | 524288 |
| Hangar Can Query Division 1 | 1048576 |
| Hangar Can Query Division 2 | 2097152 |
| Hangar Can Query Division 3 | 4194304 |
| Hangar Can Query Division 4 | 8388608 |
| Hangar Can Query Division 5 | 16777216 |
| Hangar Can Query Division 6 | 33554432 |
| Hangar Can Query Division 7 | 67108864 |
| Account Can Take Division 1 | 134217728 |
| Account Can Take Division 2 | 268435456 |
| Account Can Take Division 3 | 536870912 |
| Account Can Take Division 4 | 1073741824 |
| Account Can Take Division 5 | 2147483648 |
| Account Can Take Division 6 | 4294967296 |
| Account Can Take Division 7 | 8589934592 |
| Account Can Query Division 1 | 17179869184 |
| Account Can Query Division 2 | 34359738368 |
| Account Can Query Division 3 | 68719476736 |
| Account Can Query Division 4 | 137438953472 |
| Account Can Query Division 5 | 274877906944 |
| Account Can Query Division 6 | 549755813888 |
| Account Can Query Division 7 | 1099511627776 |
| Equipment Config | 2199023255552 |
| ContainerCan Take Division 1 | 4398046511104 |
| ContainerCan Take Division 2 | 8796093022208 |
| ContainerCan Take Division 3 | 17592186044416 |
| ContainerCan Take Division 4 | 35184372088832 |
| ContainerCan Take Division 5 | 70368744177664 |
| ContainerCan Take Division 6 | 140737488355328 |
| ContainerCan Take Division 7 | 281474976710656 |
| Can Rent Office | 562949953421312 |
| Can Rent FactorySlot | 1125899906842624 |
| Can Rent ResearchSlot | 2251799813685248 |
| Junior Accountant | 4503599627370496 |
| Starbase Config | 9007199254740992 |
| Trader | 18014398509481984 |
Current EVE version: 2.14.28028 (Revelations I)
There are no comments on this page. [Add comment]