Okay in working on making our In-game site secure in EvE.
But I can't really get it to work ....
Well EvE Clients can send headers to the server if the server is trusted ...
Well I have this piece of code to help me ...
and this Site to help me
<?php
if ($_SERVER['HTTP_EVE_TRUSTED'] == 'no')
{
header('eve.trustMe:http://www.mcdee.net/eve/::Please trust me, I\'m nice');
print '<html><body>';
print '<h1>Trust Required</h1>';
print 'I need to be trusted to work properly';
}
else
{
print '<html><body>';
print '<h1>Trusted Connection</h1>';
}
print '<h1>Eve Variables</h1>';
foreach ($_SERVER as $k=>$v)
{
if (preg_match('/^HTTP_EVE_/', $k))
{
print htmlentities($k) . ' is ' . htmlentities($v) . '<br>';
}
}
print '</body></html>';
?>
I also have the Class
<?php
// Module: EVE-Header Class
// Site: EVE I:COM, [url]http://www.eve-i.com[/url]
// Article: [url]http://www.eve-i.com/article.php?id=13[/url]
// Author: __kreischweide, [email]kreischweide@eve-i.com[/email]
class EVEHeader
{
var $trust = false;
var $CharName;
var $CorpName;
var $CorpRole;
var $RegionName;
var $ConstName;
var $SystemName;
var $StationName;
var $isDirector = false;
var $isPersonalManager = false;
var $isAccountant = false;
var $isPilot = false;
var $isFactoryManager = false;
var $isStationManager = false;
function Check($RedirectURL)
{
$returnValue = false;
$pattern = "/^EVE-minibrowser.*\/([0-9]+\.[0-9]+).*$/";
if (preg_match($pattern, $_SERVER['HTTP_USER_AGENT'], $matchs))
if ($matchs[1] >= 2.0)
$returnValue = true;
if (!$returnValue)
header("Location: ".$RedirectURL);
return $returnValue;
}
function TrustInit($TrustSiteURL, $TrustSiteText)
{
if($_SERVER['HTTP_EVE_TRUSTED']=="yes")
{
$this->trust = true;
$this->CharName = $_SERVER['HTTP_EVE_CHARNAME'];
$this->CorpName = $_SERVER['HTTP_EVE_CORPNAME'];
$this->CorpRole = $_SERVER['HTTP_EVE_CORPROLE'];
$this->RegionName = $_SERVER['HTTP_EVE_REGIONNAME'];
$this->ConstName = $_SERVER['HTTP_EVE_CONSTELLATIONNAME'];
$this->SystemName = $_SERVER['HTTP_EVE_SOLARSYSTEMNAME'];
$this->StationName = $_SERVER['HTTP_EVE_STATIONNAME'];
if($this->CorpRole & 1)
$this->isDirector = true;
if($this->CorpRole & 128)
$this->isPersonalManager = true;
if($this->CorpRole & 256)
$this->isAccountant = true;
if($this->CorpRole & 512)
$this->isPilot = true;
if($this->CorpRole & 1024)
$this->isFactoryManager = true;
if($this->CorpRole & 2048)
$this->isStationManager = true;
return true;
}
if($_SERVER['HTTP_EVE_TRUSTED']=="no")
header("eve.trustMe:".$TrustSiteURL."::".$TrustSiteText);
return false;
}
}
?>
Well after the the site it trusted I want it to display a html page
like this ONE (our officiel in-game site)
I want to use the CORPNAME header to check is the player viewing the page is from our corp "Nomads"
If yes ..the html page is displayed .. if not he get a access denied
i know it should be a cakewalk .... but I haven't found the cake to walk on 🙁