|
| Pages: [1] 2 :: one page | |
| Author | Thread Statistics | Show CCP posts - 4 post(s) |
![]() Roxane |
Posted - 2003.07.05 09:57:00 -
[1] Can anyone give me detailed info on setting up my in game browser site to do the trusted site thingy :) I've got the code but cant get it to work properly :( Pls help Roxane Editor - Gallente Enquirer ![]() |
Roxane Gallente |
Posted - 2003.07.05 09:57:00 -
[2] Can anyone give me detailed info on setting up my in game browser site to do the trusted site thingy :) I've got the code but cant get it to work properly :( Pls help Roxane Editor - Gallente Enquirer ![]() |
![]() Dale Cussler |
Posted - 2003.07.05 22:48:00 -
[3] What language are you using? Would help :p /Dale |
Dale Cussler Gallente Sniggerdly Pandemic Legion |
Posted - 2003.07.05 22:48:00 -
[4] What language are you using? Would help :p |
![]() Roxane |
Posted - 2003.07.06 09:55:00 -
[5] I've tried both the php and asp codes - neither seem to work. (for me - others use it fine) I guess I'm making a simple mistake somewhere I'm no expert with these - fine with HTML tho :) Roxane Editor - Gallente Enquirer ![]() |
Roxane Gallente |
Posted - 2003.07.06 09:55:00 -
[6] I've tried both the php and asp codes - neither seem to work. (for me - others use it fine) I guess I'm making a simple mistake somewhere I'm no expert with these - fine with HTML tho :) Roxane Editor - Gallente Enquirer ![]() |
![]() Dale Cussler |
Posted - 2003.07.08 20:18:00 -
[7] Well, the key is that first off, you should check the actual http headers that got sent along with the request - I'm not sure in PHP how to do it, but with mod_perl you do it like this:
(i.e. you want the "eve.trusted" header. If it exists, you are on the trusted list, and you can look at the following headers to get some extra information: (From http://www.mcdee.net/eve/headers.html) # eve.charname - the name of the user's character (note that this is not the user's account name) # eve.corpname - the name of the corporation of which the user is a member # eve.corprole - the roles that the user has in the corporation. This is a numerical value which is the sum of the values of the roles which you have within the corporation. The values for the individual roles are as follows (note that you can carry out a bitwise AND operation to see if a user has a particular role or not) * 1 - Director * 128 - Personnel Manager * 256 - Accountant * 1024 - Factory Manager * 2048 - Station Manager * 4096 - Auditor * 8192 - Security Group 1 * 16384 - Security Group 2 * 32768 - Security Group 3 * 65536 - Security Group 4 * 131072 - Security Group 5 * 262144 - Security Officer # eve.regionname - the name of the region in which the user is currently located # eve.constellationname - the name of the constellation in which the user is currently located # eve.solarsystemname - the name of the solar system in which the user is currently located # eve.stationname - the name of the station in which the user is currently located. If the user is not in a station at the time that the request is made then this header will report 'None' Okay, now, suppose your site -isnt- on the trusted list, first thing you must do is send along an extra http header with the content of the page: eve.trustme - the content should be "url of page to trust::message" For example, on the fan site I run, the in-game part of it will add this header if the browser doesn't have the site on the trusted list:
That should pop up the dialog in question. It's usually good to send along a plain HTML page with this header, that just contains the message that this is an in-game browser only site and that it requires trust. Hope this helps /Dale |
Dale Cussler Gallente Sniggerdly Pandemic Legion |
Posted - 2003.07.08 20:18:00 -
[8] Well, the key is that first off, you should check the actual http headers that got sent along with the request - I'm not sure in PHP how to do it, but with mod_perl you do it like this:
(i.e. you want the "eve.trusted" header. If it exists, you are on the trusted list, and you can look at the following headers to get some extra information: (From http://www.mcdee.net/eve/headers.html) # eve.charname - the name of the user's character (note that this is not the user's account name) # eve.corpname - the name of the corporation of which the user is a member # eve.corprole - the roles that the user has in the corporation. This is a numerical value which is the sum of the values of the roles which you have within the corporation. The values for the individual roles are as follows (note that you can carry out a bitwise AND operation to see if a user has a particular role or not) * 1 - Director * 128 - Personnel Manager * 256 - Accountant * 1024 - Factory Manager * 2048 - Station Manager * 4096 - Auditor * 8192 - Security Group 1 * 16384 - Security Group 2 * 32768 - Security Group 3 * 65536 - Security Group 4 * 131072 - Security Group 5 * 262144 - Security Officer # eve.regionname - the name of the region in which the user is currently located # eve.constellationname - the name of the constellation in which the user is currently located # eve.solarsystemname - the name of the solar system in which the user is currently located # eve.stationname - the name of the station in which the user is currently located. If the user is not in a station at the time that the request is made then this header will report 'None' Okay, now, suppose your site -isnt- on the trusted list, first thing you must do is send along an extra http header with the content of the page: eve.trustme - the content should be "url of page to trust::message" For example, on the fan site I run, the in-game part of it will add this header if the browser doesn't have the site on the trusted list:
That should pop up the dialog in question. It's usually good to send along a plain HTML page with this header, that just contains the message that this is an in-game browser only site and that it requires trust. Hope this helps |
![]() Roxane |
Posted - 2003.07.12 13:15:00 -
[9] Got it going now - I hope Thx for the help :) Roxane Editor - Gallente Enquirer ![]() |
Roxane Gallente |
Posted - 2003.07.12 13:15:00 -
[10] Got it going now - I hope Thx for the help :) Roxane Editor - Gallente Enquirer ![]() |
![]() Crypton |
Posted - 2003.07.15 02:18:00 -
[11] for asp use this method: checkfile basic layout: <% 'Dim InGame 'In game browser InGame=(instr(request.ServerVariables("HTTP_USER_AGENT"),"EVE-minibrowser")>0) Char="" Corp="" CorpRole="" Station="" SolarStytem="" Constellation="" Region="" Trusted=False InStation=False if InGame then Trusted=(request.ServerVariables("HTTP_EVE.TRUSTED")="yes") If Trusted then Char=Trim(request.ServerVariables("HTTP_EVE.CHARNAME") & " ") Corp=Trim(request.ServerVariables("HTTP_EVE.CORPNAME") & " ") CorpTitle=Trim(request.ServerVariables("HTTP_EVE.CORPTITLE") & " ") CorpRole=Trim(request.ServerVariables("HTTP_EVE.CORPROLE") & " ") Station=Trim(request.ServerVariables("HTTP_EVE.STATIONNAME") & " ") SolarStytem=Trim(request.ServerVariables("HTTP_EVE.SOLARSYSTEMNAME") & " ") Constellation=Trim(request.ServerVariables("HTTP_EVE.CONSTELLATIONNAME") & " ") Region=Trim(request.ServerVariables("HTTP_EVE.REGIONNAME") & " ") If Station<>"None" then InStation=true end if end if %> ----------------------------------------------- include the checkfile at top of web document <!--#include virtual="/checkfile.asp" --> ** Code for asking for trust in body of page ** <% if Trusted then %> <% response.redirect "page.xxx" %> <% else %> <% Response.AddHeader "eve.trustMe","http://www.yoursite.com/::Your reason for asking to be trusted, or other message here." Response.Write(Request.ServerVariables("HTTP_EVE.TRUSTED")) %> <% end if %> ** hijacked Stav excuse #101 **
|
Crypton Amarr Ends Journey |
Posted - 2003.07.15 02:18:00 -
[12] for asp use this method: checkfile basic layout: <% 'Dim InGame 'In game browser InGame=(instr(request.ServerVariables("HTTP_USER_AGENT"),"EVE-minibrowser")>0) Char="" Corp="" CorpRole="" Station="" SolarStytem="" Constellation="" Region="" Trusted=False InStation=False if InGame then Trusted=(request.ServerVariables("HTTP_EVE.TRUSTED")="yes") If Trusted then Char=Trim(request.ServerVariables("HTTP_EVE.CHARNAME") & " ") Corp=Trim(request.ServerVariables("HTTP_EVE.CORPNAME") & " ") CorpTitle=Trim(request.ServerVariables("HTTP_EVE.CORPTITLE") & " ") CorpRole=Trim(request.ServerVariables("HTTP_EVE.CORPROLE") & " ") Station=Trim(request.ServerVariables("HTTP_EVE.STATIONNAME") & " ") SolarStytem=Trim(request.ServerVariables("HTTP_EVE.SOLARSYSTEMNAME") & " ") Constellation=Trim(request.ServerVariables("HTTP_EVE.CONSTELLATIONNAME") & " ") Region=Trim(request.ServerVariables("HTTP_EVE.REGIONNAME") & " ") If Station<>"None" then InStation=true end if end if %> ----------------------------------------------- include the checkfile at top of web document <!--#include virtual="/checkfile.asp" --> ** Code for asking for trust in body of page ** <% if Trusted then %> <% response.redirect "page.xxx" %> <% else %> <% Response.AddHeader "eve.trustMe","http://www.yoursite.com/::Your reason for asking to be trusted, or other message here." Response.Write(Request.ServerVariables("HTTP_EVE.TRUSTED")) %> <% end if %> ** hijacked Stav excuse #101 **
|
![]() BH Trimaster |
Posted - 2003.07.17 21:00:00 -
[13] 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 |
Posted - 2003.07.17 21:00:00 -
[14] 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 |
Posted - 2003.10.08 15:00:00 -
[15] 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 |
Posted - 2003.10.08 15:00:00 -
[16] 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. |
![]() Bane Sellante |
Posted - 2003.10.08 16:57:00 -
[17] Edited by: Bane Sellante on 08/10/2003 16:58:33 Well I must say that looking at that makes my eyes go nice and wide.... Looking at this I am wondering if it is possible to adapt the PHP slightly so that if you access the webpage from the ingame browser it will direct you to one page whilst any other browser will take you on into the site?? Not really interested in the trusted stuff at the moment (mostly because I cant get my head round it!) Cheers, ----------------------- Cold Fusion Inc. Website |
Bane Sellante Shiva |
Posted - 2003.10.08 16:57:00 -
[18] Edited by: Bane Sellante on 08/10/2003 16:58:33 Well I must say that looking at that makes my eyes go nice and wide.... Looking at this I am wondering if it is possible to adapt the PHP slightly so that if you access the webpage from the ingame browser it will direct you to one page whilst any other browser will take you on into the site?? Not really interested in the trusted stuff at the moment (mostly because I cant get my head round it!) Cheers, ----------------------- Cold Fusion Inc. Website |
![]() Djarid |
Posted - 2003.10.13 18:54:00 -
[19] 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
Hope this helps It is amazing what you can accomplish if you do not care who gets the credit. Harry S Truman (1884 - 1972) |
Djarid Caldari Joint Espionage and Defence Industries |
Posted - 2003.10.13 18:54:00 -
[20] 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
Hope this helps It is amazing what you can accomplish if you do not care who gets the credit. Harry S Truman (1884 - 1972) |
![]() BH Trimaster |
Posted - 2003.10.14 15:16:00 -
[21] Edited by: BH Trimaster on 14/10/2003 15:17:40
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 |
Posted - 2003.10.14 15:16:00 -
[22] Edited by: BH Trimaster on 14/10/2003 15:17:40
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. |
![]() Shellion |
Posted - 2005.03.14 11:29:00 -
[23]
You must check this carefully as the server often caches variables. For example, if you access the site from inside the game, then from a standard browser, the server can still remember the HTTP_EVE_TRUSTED variable although it won't have any value set. A safe way is to use the following: $iAmTrusted=false; $inGame=false; if (isset($_SERVER['HTTP_EVE_TRUSTED'])) { // just because it is understood does not mean we are in the game ! if ($_SERVER['HTTP_EVE_TRUSTED'] == 'no' ) { header('eve.trustMe:http://www.mysite.com/::Please trust this site if you wish to use the forums or post news/ announcements.' ); $inGame=true; // as HTTP_EVE_TRUSTED has a value we are in the game } elseif ($_SERVER['HTTP_EVE_TRUSTED'] == 'yes' ) { $inGame=true; $iAmTrusted=true; // we are in the game and trusted ! } } if (!$inGame) { // out of game site... } elseif (!$iAmTrusted) { // not trusted stuff... } else { // trusted stuff... } _______________________________________________ (\_/) (O.o) (> <) This is Bunny. Copy Bunny into your signature to help him on his way to world domination. |
Shellion |
Posted - 2005.03.14 11:29:00 -
[24]
You must check this carefully as the server often caches variables. For example, if you access the site from inside the game, then from a standard browser, the server can still remember the HTTP_EVE_TRUSTED variable although it won't have any value set. A safe way is to use the following: $iAmTrusted=false; $inGame=false; if (isset($_SERVER['HTTP_EVE_TRUSTED'])) { // just because it is understood does not mean we are in the game ! if ($_SERVER['HTTP_EVE_TRUSTED'] == 'no' ) { header('eve.trustMe:http://www.mysite.com/::Please trust this site if you wish to use the forums or post news/ announcements.' ); $inGame=true; // as HTTP_EVE_TRUSTED has a value we are in the game } elseif ($_SERVER['HTTP_EVE_TRUSTED'] == 'yes' ) { $inGame=true; $iAmTrusted=true; // we are in the game and trusted ! } } if (!$inGame) { // out of game site... } elseif (!$iAmTrusted) { // not trusted stuff... } else { // trusted stuff... } _______________________________________________ (\_/) (O.o) (> <) This is Bunny. Copy Bunny into your signature to help him on his way to world domination. |
![]() Shellion |
Posted - 2005.03.14 12:36:00 -
[25] Forgot to mention, check this site out for everything you even wanted to know about the eve minibrowser.... http://www.mcdee.net/eve/html.html _______________________________________________ (\_/) (O.o) (> <) This is Bunny. Copy Bunny into your signature to help him on his way to world domination. |
Shellion |
Posted - 2005.03.14 12:36:00 -
[26] Forgot to mention, check this site out for everything you even wanted to know about the eve minibrowser.... http://www.mcdee.net/eve/html.html _______________________________________________ (\_/) (O.o) (> <) This is Bunny. Copy Bunny into your signature to help him on his way to world domination. |
![]() MinorFreak |
Posted - 2005.03.15 03:26:00 -
[27] i heard it was too easy to spoof the security around the IGB. Besides, why would you want "trusted" anyways, for it seems alot of bother for little reward? |
MinorFreak Amarr Ordo Ministorum |
Posted - 2005.03.15 03:26:00 -
[28] i heard it was too easy to spoof the security around the IGB. Besides, why would you want "trusted" anyways, for it seems alot of bother for little reward? |
![]() Mining Maxx |
Posted - 2005.03.21 22:55:00 -
[29] Edited by: Mining Maxx on 21/03/2005 22:58:12 Minorfreak: well, trust offers some interesting options to websites if they make use of it. i think the most obvious advantage of trust usage is database operations which are based e.g. on a player, his corp, his roles or the system he's in. there are plenty of possible uses, its just up to you ;) regards... PS. can cussler or any moderator please edito or delete his post? its messing up the whole thread on my system due to some messed up font size, thanks |
Mining Maxx Caldari |
Posted - 2005.03.21 22:55:00 -
[30] Edited by: Mining Maxx on 21/03/2005 22:58:12 Minorfreak: well, trust offers some interesting options to websites if they make use of it. i think the most obvious advantage of trust usage is database operations which are based e.g. on a player, his corp, his roles or the system he's in. there are plenty of possible uses, its just up to you ;) regards... PS. can cussler or any moderator please edito or delete his post? its messing up the whole thread on my system due to some messed up font size, thanks |
| Pages: [1] 2 :: one page | |
| First page | Previous page | Next page | Last page | |
| Copyright © 2006-2025, Chribba - OMG Labs. All Rights Reserved. - perf 0,05s, ref 20250926/1010 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. |