|
You last visited: Today at 19:43
Advertisement
convert php to html .. Is it possible?
Discussion on convert php to html .. Is it possible? within the SRO Coding Corner forum part of the Silkroad Online category.
06/10/2015, 09:31
|
#1
|
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 524
|
convert php to html .. Is it possible?
Is it possible to convert that code
Code:
<?php
$ip = '178.63.59.165'; //Server ip adress
$port = '15779'; //Server port
function server_status($ip, $port)
{
$status = array("<strong>Server is:</strong><span style='color:#F00;'>Offline</span>", "<strong>Server is:</strong><span style='color:#0F0;'>Online </span>
");
$fp = @fsockopen($ip, $port, $errno, $errstr, 2);
if (!$fp) {
return $status[0];
}
else
{
return $status[1];
}
}
echo server_status($ip, $port);
?>
From Php To Html ?
i know it maybe the wrong place but i couldent find a right section for it special that a server state check for sro
|
|
|
06/10/2015, 10:13
|
#2
|
elite*gold: 0
Join Date: Mar 2009
Posts: 537
Received Thanks: 156
|
its not possible since html is static describing language and clientsided, while php is serverside programming langugage
|
|
|
06/10/2015, 11:46
|
#3
|
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 524
|
Quote:
Originally Posted by alexhun
its not possible since html is static describing language and clientsided, while php is serverside programming langugage
|
i got that to while searching .. but
there is any same Java or html script do the same ?
|
|
|
06/10/2015, 13:25
|
#4
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,841
Received Thanks: 4,675
|
Quote:
Originally Posted by its.soul
i got that to while searching .. but
there is any same Java or html script do the same ?
|
No
|
|
|
06/10/2015, 16:45
|
#5
|
elite*gold: 0
Join Date: Jul 2009
Posts: 1,860
Received Thanks: 760
|
Sadly not.
You have to think about this: Your php codes are some handsome little cute kitties.
If you put them into a html/htm/js/any, you will uncover their cage, and bully ugly beasty dogs will rip them apart.
PHP codes need to be secured, which is only possible doing a simple .php document file for it.
No one can ever read your php codes, if you do so. Anything else, who ever has said/going to say, might be insecure.
|
|
|
06/10/2015, 17:11
|
#6
|
elite*gold: 8
Join Date: Sep 2014
Posts: 625
Received Thanks: 178
|
You could do that with JavaScript.
|
|
|
06/11/2015, 10:15
|
#7
|
elite*gold: 0
Join Date: Jun 2007
Posts: 722
Received Thanks: 390
|
What is your purpose ?
Because I don't see the point to convert this php code into html O.o
I mean php and html is just totaly different.
|
|
|
06/11/2015, 12:06
|
#8
|
elite*gold: 85
Join Date: Aug 2010
Posts: 1,278
Received Thanks: 524
|
sure i know ,
i mean if i got an html page , and i cant import any php & like using google service ( blogspot ) with a paid design then i just met that i cant import or using ifram or objects to included Any php code & functions
so there is anyway & script to check if the ip : port is Online or No
|
|
|
07/05/2015, 22:39
|
#9
|
elite*gold: 0
Join Date: Jun 2015
Posts: 28
Received Thanks: 2
|
It might be possible with java script
Code:
function testWebSocket() {
websocket = new WebSocket("Server IP");
websocket.onopen = function(evt) { onOpen(evt) };
websocket.onclose = function(evt) { onClose(evt) };
websocket.onmessage = function(evt) { onMessage(evt) };
websocket.onerror = function(evt) { onError(evt) };
}
If the websocket is made your server would be online. Although I don't know too much about java script.
But like others have mentioned, this is insecure, although since it's only your server IP showing, it shouldn't be too bad. I wouldn't recommend doing much else outside of PHP though.
|
|
|
07/15/2015, 02:26
|
#10
|
elite*gold: 0
Join Date: Jul 2011
Posts: 350
Received Thanks: 421
|
You don't necessarily have to use Blogspot.
|
|
|
07/16/2015, 10:52
|
#11
|
elite*gold: 0
Join Date: Apr 2015
Posts: 1,444
Received Thanks: 1,373
|
Really.........
No you can't convert PHP's functions in HTML, maybe there is something in HTML 5 that can create a "new" function, but, main question. NO you can't create a PING server **** in pure HTML.
|
|
|
07/30/2015, 20:09
|
#12
|
elite*gold: 1
Join Date: Jul 2015
Posts: 207
Received Thanks: 60
|
woah it's possible to convert forms inside of php to html but you cant convert the actual php code to html because html is client side scripting language and php is server side
|
|
|
07/30/2015, 20:39
|
#13
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,841
Received Thanks: 4,675
|
Can we close this thread ?
It is not possible, answer was given and question is done, isn't it ?
|
|
|
 |
Similar Threads
|
Kick to convert: easy and fast way to convert your item_proto/mob_proto to txt files!
09/07/2016 - Metin2 PServer Guides & Strategies - 21 Replies
Hi all,
this is my first release :)
This "kick converter" will allow you to generate txt files (item_names, item_proto, mob_proto, mob_names) for the rev-34k game.
The script was written in python by me, so you need python 2.7 and MySQLDB (python extension) installed on your server.
If you found any error, please report it to me and I'll fix it as soon as possibile.
PS: If you get errors while converting the item_proto, please remove items that have type 29 or type 31.
|
[Joomla][HTML] modul in einer html datei verlinken?
11/11/2011 - Web Development - 1 Replies
ich hab vorher im joomla forum schon ein thread geöffnet aber da antwortet mir niemand und ich ich langsam keine gedult mehr.. will heute noch weiter probieren und so.
----------------------------------------
Bei den Modulen gibt es ein leeres, wo man ein editor hat. Ist es möglich eine verlinkung zum modul in der html zu machen?
Hier ein beispiel vom aufbau meiner website: Vorstellung wie die website ungefähr sein soll, wo ich welche div container gemacht habe, wie das ganze zur zeit...
|
All times are GMT +1. The time now is 19:44.
|
|