[Tool/Web/Other] Php Samp Server Status
#1

Hi Guys,

I want to use a php script for my website.

When they come to my site , They will write a Ip and port..
And my site will give to them a image link.

When someone see this image, This image say to them 120/500 - Uptime - Servername bla bla.

Actually I want to make like that : http://samp.ae-webmedia.de/signature/


Can you give me a php script for that ? Thanks
Reply
#2

Post here: https://sampforum.blast.hk/showthread.php?tid=447813 Please.
Reply
#3

Awsome.
Reply
#4

Quote:
Originally Posted by fuem1907
View Post
Hi Guys,

I want to use a php script for my website.

When they come to my site , They will write a Ip and port..
And my site will give to them a image link.

When someone see this image, This image say to them 120/500 - Uptime - Servername bla bla.

Actually I want to make like that : http://samp.ae-webmedia.de/signature/


Can you give me a php script for that ? Thanks
Here You Go!

PHP Code:

<html>
<
head>
<
style type="text/css">
bodytable tr td {
font-family:Verdana;
font-size:10px;
}
</
style>
<
script type="text/javascript">
    
    function 
getCodes(){
        var 
server_ip document.getElementById("server_ip").value;
        var 
server_port document.getElementById("server_port").value;
        var 
text_color document.getElementById("text_color").value;
        var 
background_color document.getElementById("background_color").value;
        var 
border_color document.getElementById("border_color").value;
        var 
background_image document.getElementById("background_image").value;
        
document["preview"].src 'http://samp.ae-webmedia.de/signature/signature.php?bg='+background_color+'&text='+text_color+'&border='+border_color+'&ip='+server_ip+'&port='+server_port+'&bg_image='+background_image;
        
document["preview_big"].src 'http://samp.ae-webmedia.de/signature/signature_big.php?bg='+background_color+'&text='+text_color+'&border='+border_color+'&ip='+server_ip+'&port='+server_port+'&bg_image='+background_image;
        
        
document.getElementById("html_code").value '<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature.php?bg='+background_color+'&text='+text_color+'&border='+border_color+'&ip='+server_ip+'&port='+server_port+'&bg_image='+background_image+'"></a>';
        
document.getElementById("bb_code").value '[img]http://samp.ae-webmedia.de/signature/signature.php?bg='+background_color+'&text='+text_color+'&border='+border_color+'&ip='+server_ip+'&port='+server_port+'&bg_image='+background_image+'[/img]'
;
        
document.getElementById("html_code_big").value '<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature_big.php?bg='+background_color+'&text='+text_color+'&border='+border_color+'&ip='+server_ip+'&port='+server_port+'&bg_image='+background_image+'"></a>';
        
document.getElementById("bb_code_big").value '[img]http://samp.ae-webmedia.de/signature/signature_big.php?bg='+background_color+'&text='+text_color+'&border='+border_color+'&ip='+server_ip+'&port='+server_port+'&bg_image='+background_image+'[/img]';
    }
    
    function 
reset(){
    
document.getElementById("server_ip").value '178.218.214.78';
    
document.getElementById("server_port").value '7702';
    
document.getElementById("text_color").value 'FFFFFF';
    
document.getElementById("background_color").value '000000';
    
document.getElementById("border_color").value 'a0a0a0';
    
document["preview"].src 'http://';
    
    
document.getElementById("html_code").value '';
    
document.getElementById("bb_code").value '';
    
document.getElementById("html_code_big").value '';
    
document.getElementById("bb_code_big").value '';
    
document.getElementById("background_image").value '';
    }
    
</script>

<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
  <script type="text/javascript">
        function refresh()
        {
                $.get('counter.txt', function(data) { $('#counter').html(data); setTimeout('refresh()', 1000); })
        }
  </script>
<title>Free SA:MP Live Server Signature</title>
</head>
<body onload="refresh()">
<center>
<h1>Free SA:MP Live Signature</h1>
Generate your own free live siganture with this little wizard!<br />
The whole process takes just a few seconds!<br />
<br />
Examples:<br />
<!--
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature.php?bg=000000&text=FFFFFF&border=a0a0a0&ip=93.119.26.207&port=7777"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature.php?bg=006ecc&text=000000&border=a0a0a0&ip=93.119.26.207&port=7777"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature.php?bg=000000&text=000000&border=a0a0a0&ip=93.119.26.207&port=7777&bg_image=www.nigraphic.com/files/images/iran_desert_maranjab_1.jpg"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature_big.php?bg=000000&text=FFFFFF&border=a0a0a0&ip=93.119.26.207&port=7777"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature_big.php?bg=006ecc&text=000000&border=a0a0a0&ip=93.119.26.207&port=7777"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="http://samp.ae-webmedia.de/signature/signature_big.php?bg=000000&text=000000&border=a0a0a0&ip=93.119.26.207&port=7777&bg_image=www.nigraphic.com/files/images/iran_desert_maranjab_1.jpg"></a><br />
//-->
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="previews/1.png"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="previews/2.png"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="previews/3.png"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="previews/4.png"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="previews/5.png"></a><br />
<br />
<a target="_blank" href="http://samp.ae-webmedia.de/signature/"><img border="0" src="previews/6.png"></a><br />
<br />
<br />
<table>
<tr>
<td>Server IP:</td><td><input style="width:294px;" type="text" id="server_ip" value="91.121.146.118" /></td>
</tr>
<tr>
<td>Server Port:</td><td><input style="width:294px;" type="text" id="server_port" value="7777" /></td>
</tr>
<tr>
<td>Text Color:</td><td>#<input style="width:286px;" style="width:141px;" type="text" id="text_color" value="FFFFFF" /></td>
</tr>
<tr>
<td>Background Color:</td><td>#<input style="width:286px;" type="text" id="background_color" value="000000" /></td>
</tr>
<tr>
<td>Border Color:</td><td>#<input style="width:286px;" type="text" id="border_color" value="a0a0a0" /></td>
</tr>
<tr>
<td>Background Image*:</td><td>http://<input style="width:257px;" type="text" id="background_image" value="" /></td>
</tr>
<tr>
<td><input onmousedown="getCodes()" type="button" value="Get Codes" /></td><td><input onmousedown="reset()" type="button" value="Reset" /></td>
</tr>
</table>
* is optional and needs to be written without http:// !<br />
The format has to be JPG or JPEG!
The resolution should be the same like the signatures (400x80, 400x20).<br />
If the image is bigger than the signature, then the image gets cut off.<br />
<br />
<br />
<br />
Preview (click "Get Codes" to view):<br />
<img src="" width="400px" height="20px" name="preview" border="0"><br />
<br />
<img src="" width="400px" height="80px" name="preview_big" border="0">
<br />
<br />
<br />
HTML Code (e.g. Websites):<br />
<textarea onfocus="this.select();" style="width:400px;height:100px;" id="html_code" readonly></textarea><br />
<br />
BB Code (e.g. Forums):<br />
<textarea onfocus="this.select();" style="width:400px;height:100px;" id="bb_code" readonly></textarea><br />
<br />
HTML Code <b/>BIG</b> (e.g. Websites):<br />
<textarea onfocus="this.select();" style="width:400px;height:100px;" id="html_code_big" readonly></textarea><br />
<br />
BB Code <b>BIG</b> (e.g. Forums):<br />
<textarea onfocus="this.select();" style="width:400px;height:100px;" id="bb_code_big" readonly></textarea><br />
<br />
<br />
<span id="counter"></span> signatures displayed yet
<br />
<br />
Script © by Arne E.<br />
<br />
<br />
<br />
<br />
<script type="text/javascript" src="http://www.ipcounter.de/count_js.php?u=54166077&amp;color=pink"></script>
<noscript><a href="http://www.ipcounter.de/stats.php?u=54166077" target="_blank"><img src="http://www.ipcounter.de/count.php?u=54166077&amp;color=pink" alt="IPCOUNTER.DE - Kostenloser Live Counter!" border="0" /></a></noscript>
</body>
</html> 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)