Hello All,
My name is Josh, I have a question about some simple HTML that I would like to receive some help with.
------
Me and a friend run a Counter-strike hosting company, and we have created the following HTML code, however there is a error, and I cannot figure out the problem.
If you look at the address below,
http://184.154.138.58/test3.php?ip=184.154.138.58&port=36965
You can see that on the third line down, there is a table, set with the server name.
The server name is
cZ» Sparta
I don't know the error, but the server name should actually be,
cZ» Sparta
Somehow a random "A" letter is inserted. How might I fix this?
I would appreciate any help. Thx.
The file appears to use UTF-8 character encoding, but your server is sending it as
Content-Type: text/html
rather than as
Content-Type: text/html; charset=UTF-8
so the browser has to guess what character encoding to use.
It isn't a proper html document, since it starts "<table border="1"><tr><td>IP</td><td>184.154.138.58</td></tr><tr><td>Port</td><td>36965</td></tr><tr><td>Name</td><td>cZ» Sparta..."
Your program needs to output the rest of the document, starting with doctype, including <html>, <head>, <body>, etc.
In the html document you should specify what encoding you are using; the character problem is almost certainly a confusion of encodings. We can't find the problem (if there is one) in the php program without seeing it...
HTH
So, I need to Format and include <html>, <head>, <body>, etc.
And how might I change it from Content-Type: text/html
to
Content-Type: text/html; charset=UTF-8
You don't add the charset in your HTML. You add it by configuring the server. The details vary depending on the server, but could be as easy as adding the line
Okay, so I have added the charset to the .htaccess file, rebooted the server, restarted Apache and nothing seems to have changed. Is there any other way i could fix this? or Is it just my bad luck.
The charset (or lack thereof) hasn't changed:
Oops... I forgot about PHP. The PHP file will need to include the following at the beginning:
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)