| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Emiug
Caldari Evolution Band of Brothers
|
Posted - 2008.04.28 13:28:00 -
[1]
im currently writing a site for inside the IGB, i finished all the back end etc, but i have one small issue.
i cannot make the browser display the "Please Trust Me" window display.
The code that i am using is as follows:
Quote: if($_SERVER['HTTP_EVE_TRUSTED']=='no') { print("This site must be trusted to continue..."); header('eve.trustme:'.$this_host.'/::This Will Allow Access To The Database.',false); }
Im unsure as to why it will not display, any help would be much appreciated.
Click For Free Robert Dobbs Video Strip Show*
|

Lumy
Minmatar Templars of Space Insurgency
|
Posted - 2008.04.28 14:03:00 -
[2]
Edited by: Lumy on 28/04/2008 14:04:33 You should not write anything to output before setting headers. Switch those two lines and move any print/echo/html code before condition AFTER calling header.
|

Seidr
Amarr Icarus' Wings Brutally Clever Empire
|
Posted - 2008.04.28 14:04:00 -
[3]
Edited by: Seidr on 28/04/2008 14:04:59 Your print call will prevent HTTP headers from having any effect.
Edit: damn, beat me to it Lumy! ;)
|

Emiug
Caldari Evolution Band of Brothers
|
Posted - 2008.04.28 18:21:00 -
[4]
i have swapped the items around, but still no joy.
Quote:
<? if($_SERVER['HTTP_EVE_TRUSTED']=='no') { header('eve.trustme:'.$this_host.'/::This Will Allow Access To The Database.'); print("This site must be trusted to continue..."); } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test</title> </head>
<body> <?php morecode....
The above is the exact copy of the top of my page, so i dont know if theres anything here im doing wrong
Click For Free Robert Dobbs Video Strip Show*
|

Ki Anna
Ki Tech Industries
|
Posted - 2008.04.28 19:02:00 -
[5]
Try this Quote:
<? if($_SERVER['HTTP_EVE_TRUSTED'] != 'yes') { header('eve.trustMe:http://' . $_SERVER['HTTP_HOST'] . '/::This Will Allow Access To The Database.'); print("This site must be trusted to continue..."); } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test</title> </head>
<body> <?php morecode....
|

Emiug
Caldari Evolution Band of Brothers
|
Posted - 2008.04.28 21:12:00 -
[6]
Still no luck, the site will get into the part of the function which sends the header.
So the site currently sits with "This site must be trusted to continue..." on the page until you manually add the site
Click For Free Robert Dobbs Video Strip Show*
|

Lumy
Minmatar Templars of Space Insurgency
|
Posted - 2008.04.28 21:33:00 -
[7]
1. Check trusted sites in IGB, if your site is not already in list as not trusted. 2. Make sure there is NOTHING on output before setting header. Not even BOM, if you're editing file in UTF8. 3. Var_dump content of header to output and post it here. Maybe you have something wrong with header itself.
|

Emiug
Caldari Evolution Band of Brothers
|
Posted - 2008.04.28 21:55:00 -
[8]
if i do var_dump(header('eve.trustme:'.$_SERVER['HTTP_HOST'].'/::This Will Allow Access To The Database.'));
the output is as follows
Quote: n++
i saved the file in ANSI to try remove anything that wasnt there, but it still didnt work
Click For Free Robert Dobbs Video Strip Show*
|

Lumy
Minmatar Templars of Space Insurgency
|
Posted - 2008.04.28 22:07:00 -
[9]
I meant var_dump('eve.trustme:'.$_SERVER['HTTP_HOST'].'/::This Will Allow Access To The Database.');
Then open site in IGB, right-click on page and 'view source'. Ctrl-c ctrl-v it here.
|

Emiug
Caldari Evolution Band of Brothers
|
Posted - 2008.04.28 23:50:00 -
[10]
done that and i get the following
Quote: n++string(69) "eve.trustme:alanabram.co.uk/::This Will Allow Access To The Database."
Click For Free Robert Dobbs Video Strip Show*
|

Lumy
Minmatar Templars of Space Insurgency
|
Posted - 2008.04.29 08:14:00 -
[11]
You are missing protocol - http://
Well, this might be the problem, I have no way to test it out now.
|

Emiug
Caldari Evolution Band of Brothers
|
Posted - 2008.04.29 10:54:00 -
[12]
i replaced added the http:// and the folder path to the end of address, but i still just get the "you must trust me" message
Click For Free Robert Dobbs Video Strip Show*
|

Liliane Woodhead
Intergalactic Charwomen
|
Posted - 2008.04.30 05:14:00 -
[13]
some of topic comment: i do not trust in winterblink ... but ask him for trusted code ? *g*
|

Ix Forres
Caldari Vanguard Frontiers Imperial Republic Of the North
|
Posted - 2008.04.30 06:32:00 -
[14]
Flush your output buffer after setting the header?
Call ob_flush() after setting header and see if that helps. Stab in the dark, though. You might also try using Firebug or similar to check the header is actually being read by the browser.
Blog |

Tonto Auri
Vhero' Multipurpose Corp
|
Posted - 2008.05.01 09:42:00 -
[15]
1. Do NOT trust the $_SERVER['HTTP_HOST'] and NEVER return it back to the user. The $_SERVER['HTTP_HOST'] variable are sent by the browser and MUST be treated as user input with all required precautions. 2. Do NOT, NEVER use "<?" as opening tag for PHP code. It is LONG, VERY LONG time deprecated. And one day may became not allowed. 3. if('NO' === strtoupper($_SERVER['HTTP_EVE_TRUSTED'])) Remember, that $_SERVER variables mostly user-input and You must deal with them that way. 4. header("eve.trustme: {$this_host}/::This Will Allow Access To The Database.', false); Make sure $this_host contains protocol. -- Thanks CCP for cu |
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |