Kimimaru Posted February 18, 2010 Author Share Posted February 18, 2010 Hey, everyone! I'm sorry, but I didn't know where to put this topic. Anyway, I have this PHP code that I can use to put up my own server online/offline images, but unfortunately, my webhost doesn't allow me to insert my own PHP code, only HTML. I'm wondering if anyone can convert this code to HTML for me. Thanks in advance!```[img]http://i300.photobucket.com/albums/nn38/Kimimaru4000/ServerOnlineGUI.png[/img][img]http://i300.photobucket.com/albums/nn38/Kimimaru4000/ServerOfflineGUI.png[/img]``` Link to comment Share on other sites More sharing options...
Lenton Posted February 18, 2010 Share Posted February 18, 2010 You can't convert PHP to HTML, if your host doesn't allow PHP then it must be rubbish.Try saving it as a HTML document if you haven't already. Link to comment Share on other sites More sharing options...
Chief Posted February 18, 2010 Share Posted February 18, 2010 Get a new web host then. Link to comment Share on other sites More sharing options...
Kimimaru Posted February 18, 2010 Author Share Posted February 18, 2010 Would you guys be able to write the same type code in HTML for me please, in that case? It's supposed to check to see if it connect to a server's IP and port. If it can, it will display one image; if it can't, it'll display a different image. Link to comment Share on other sites More sharing options...
Drummerpete Posted February 18, 2010 Share Posted February 18, 2010 No. HTML doesn't work like that. Link to comment Share on other sites More sharing options...
Kimimaru Posted February 19, 2010 Author Share Posted February 19, 2010 Oh, okay. Thanks anyway! Link to comment Share on other sites More sharing options...
Harris6310 Posted February 19, 2010 Share Posted February 19, 2010 Does that code work? If it does, I'm stealing it. Link to comment Share on other sites More sharing options...
Kimimaru Posted February 19, 2010 Author Share Posted February 19, 2010 I'm pretty sure it does, but you have to replace the links there or you'll be using my images. Link to comment Share on other sites More sharing options...
Guest Posted February 19, 2010 Share Posted February 19, 2010 cop/paste into notepad, save as namehere.php, upload and try ityou cant preview php documents locally as they are run server side… if you really want to see whats in it i recommend dreamweaver or something similar Link to comment Share on other sites More sharing options...
Robin Posted February 19, 2010 Share Posted February 19, 2010 PHP is pretty much just C++. It's run on the server to dynamically generate webpages.HTML is simply markup. Link to comment Share on other sites More sharing options...
Adulese Games Posted February 19, 2010 Share Posted February 19, 2010 Oh god, I'm laughing my ass off right now. Sorry, but the fact I click this topic out of pure rage and see Spike posting in it is just to perfect.Anywho, like everyone said, PHP is a server-side coding language which helps dynamically create webpages and content. HTML (and the more widely used XHTML) are just mark-up coding languages which display static content via a web browser. You cannot convert one to the other as they just complement each other. If your server doesn't allow PHP of any kind, you need a new server as almost all, even free ones, offer PHP support.- Adulese Link to comment Share on other sites More sharing options...
java Posted February 19, 2010 Share Posted February 19, 2010 You visit a webpage with .php extensionThe server processes the PHP code and receives HTML outputThe HTML output is sent to your browser like a regular .html or .htm webpage.PHP is significantly different to HTML and Javascript and CSS etc because it is a server-side language - completely uneffected by the browser. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now