Monitor this thread via RSS [?]
 
Author Thread Statistics | Show CCP posts - 4 post(s)
BH Trimaster
BH Trimaster

Take me to the EVE-Online forum thread View author posting habits View only posts by author
Posted - 2003.07.17 21:00:00 - [1]

Edited by: BH Trimaster on 08/10/2003 14:58:16
added new lines of code to make trust work, this message was updated on 8 October 2003:

for PHP use this:
<?php
ob_start(); //placed before any html is output, needed by trust header.
if (!$_SERVER['HTTP_EVE_TRUSTED'] ) {
print "You have reached an in game web page, please use the correct browser, thank you.<br>";
} else {
if ($_SERVER['HTTP_EVE_TRUSTED'] == 'no' ) {
//note don't include the actual page, just the top level dir where your pages are
header('eve.trustMe:http://your.website.here/::Please trust me, I\'m nice' );
print '<h1>Trust Required</h1>';
print 'I need to be trusted to work properly';
} else {
//success for the trusting, now you might want to check for a corpname if it's a private corp page
print '<html><title>Corporation blah blah</title><body>';
print '<h1>Welcome to Corp Blah Blah</h1><br>';
if ($_SERVER['HTTP_EVE_CORPNAME'] == 'Corp Blah Blah' ) {
//do other stuff here, like ask for a password to further secure it or whatever else comes to mind
print 'Welcome ' . $_SERVER['HTTP_EVE_CHARNAME'] . '<br>';
print 'You have been authorized. <br>';
} else {
//if it's not the corp you could tell them it's a private page.
print 'Sorry this is a private page. Please join Corp Blah Blah if you want access.<br>';
}
}
}
/*
//use this routine to see what ever passes to a trusted site
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>';

ob_end_flush(); //added after all html output is finished, needed by trust header.
?>
------------
As you can see what language you are using was a critical question...
BH Trimaster
BH Trimaster



Take me to the EVE-Online forum thread View author posting habits View only posts by author
Posted - 2003.07.17 21:00:00 - [2]

Edited by: BH Trimaster on 08/10/2003 14:58:16
added new lines of code to make trust work, this message was updated on 8 October 2003:

for PHP use this:
<?php
ob_start(); //placed before any html is output, needed by trust header.
if (!$_SERVER['HTTP_EVE_TRUSTED'] ) {
print "You have reached an in game web page, please use the correct browser, thank you.<br>";
} else {
if ($_SERVER['HTTP_EVE_TRUSTED'] == 'no' ) {
//note don't include the actual page, just the top level dir where your pages are
header('eve.trustMe:http://your.website.here/::Please trust me, I\'m nice' );
print '<h1>Trust Required</h1>';
print 'I need to be trusted to work properly';
} else {
//success for the trusting, now you might want to check for a corpname if it's a private corp page
print '<html><title>Corporation blah blah</title><body>';
print '<h1>Welcome to Corp Blah Blah</h1><br>';
if ($_SERVER['HTTP_EVE_CORPNAME'] == 'Corp Blah Blah' ) {
//do other stuff here, like ask for a password to further secure it or whatever else comes to mind
print 'Welcome ' . $_SERVER['HTTP_EVE_CHARNAME'] . '<br>';
print 'You have been authorized. <br>';
} else {
//if it's not the corp you could tell them it's a private page.
print 'Sorry this is a private page. Please join Corp Blah Blah if you want access.<br>';
}
}
}
/*
//use this routine to see what ever passes to a trusted site
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>';

ob_end_flush(); //added after all html output is finished, needed by trust header.
?>
------------
As you can see what language you are using was a critical question...
BH Trimaster
BH Trimaster

Take me to the EVE-Online forum thread View author posting habits View only posts by author
Posted - 2003.10.08 15:00:00 - [3]

the added code that makes the trust header work is:
ob_start();
ob_end_flush();

ob_start(); should be placed at the front of your php file before any html is output.

and

ob_end_flush(); should be placed at the end of your php file after all html is output.
BH Trimaster
BH Trimaster



Take me to the EVE-Online forum thread View author posting habits View only posts by author
Posted - 2003.10.08 15:00:00 - [4]

the added code that makes the trust header work is:
ob_start();
ob_end_flush();

ob_start(); should be placed at the front of your php file before any html is output.

and

ob_end_flush(); should be placed at the end of your php file after all html is output.
BH Trimaster
BH Trimaster

Take me to the EVE-Online forum thread View author posting habits View only posts by author
Posted - 2003.10.14 15:16:00 - [5]

Edited by: BH Trimaster on 14/10/2003 15:17:40
Quote:
Again it depends on the language you are using.

I do it with PHP (how I hate PHP, give me perl any day).

A simple check on the user_agent string will let you determine which browser is looking at the site, then it is just about branching.

the current useragent string is EVE-minibrowser/2.0a1

so the PHP code to check for that is

Quote:
<?php
if ($_SERVER['HTTP_USER_AGENT'] == "EVE-minibrowser/2.0a1") {
[ingame browser code]
} else {
[other browser code]
}
?>




Hope this helps



that is actually too involved, should the user agent version change etc.

instead check for $_SERVER['HTTP_EVE_TRUSTED'] like I do in my sample script above. An
external browser will not be sending that setting whereas the eve browser will. That will
not change even tho use agent might change. Doing so will ensure that as the eve browser evolves that you won't have to needlessly
modify your packages at a later date.
BH Trimaster
BH Trimaster



Take me to the EVE-Online forum thread View author posting habits View only posts by author
Posted - 2003.10.14 15:16:00 - [6]

Edited by: BH Trimaster on 14/10/2003 15:17:40
Quote:
Again it depends on the language you are using.

I do it with PHP (how I hate PHP, give me perl any day).

A simple check on the user_agent string will let you determine which browser is looking at the site, then it is just about branching.

the current useragent string is EVE-minibrowser/2.0a1

so the PHP code to check for that is

Quote:
<?php
if ($_SERVER['HTTP_USER_AGENT'] == "EVE-minibrowser/2.0a1") {
[ingame browser code]
} else {
[other browser code]
}
?>




Hope this helps



that is actually too involved, should the user agent version change etc.

instead check for $_SERVER['HTTP_EVE_TRUSTED'] like I do in my sample script above. An
external browser will not be sending that setting whereas the eve browser will. That will
not change even tho use agent might change. Doing so will ensure that as the eve browser evolves that you won't have to needlessly
modify your packages at a later date.
   
 
Copyright © 2006-2026, Chribba - OMG Labs. All Rights Reserved. - perf 0,03s, ref 20260128/2030
EVE-Online™ and Eve imagery © CCP.

COPYRIGHT NOTICE
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to EVE-Search.com to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, EVE-Search.com. CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for any damage arising from the use of this website.