Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 11:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Was ist an diesem Script falsch? [PHP]

Discussion on Was ist an diesem Script falsch? [PHP] within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1


 
DasPrinzip.'s Avatar
 
elite*gold: 727
Join Date: Feb 2012
Posts: 1,207
Received Thanks: 303
Was ist an diesem Script falsch? [PHP]

Wenn ich auf Senden drücke, wird nichts angezeigt?
PHP Code:
<form action="tools.php" method="post">
        <
table>
            <
th>
                <
td><font color="white">IP:</font></td>
                <
td><input type="text" name="ip" /></td>
            </
th>
            <
th>
                <
td></td>
                <
td><input type="submit" Value="Senden" name="submit"/></td>
            </
th>
        </
table>
</
form>
            <
br /><br /><br /> 
PHP Code:
        <?php
$ip 
$_POST['ip'];

if (isset(
$_POST["submit"]))
{
if (!
$socket = @fsockopen($ip80$errno$errstr30))

{
  echo 
"<font color='red'><strong>" .$ip"Offline!</strong></font>";
}
else 
{
  echo 
"<font color='green'><strong>" .$ip"Online!/strong></font>";
  

  
fclose($socket);
}
}

?>
DasPrinzip. is offline  
Old 08/07/2012, 21:40   #2
 
JPGaming's Avatar
 
elite*gold: 169
Join Date: Jul 2011
Posts: 392
Received Thanks: 261
Quote:
Originally Posted by DasPrinzip. View Post
Wenn ich auf Senden drücke, wird nichts angezeigt?
<?php
$ip = $_POST['ip'];

if (isset($_POST["submit"]))
{
if (!$socket = @fsockopen($ip, 80, $errno, $errstr, 30))

{
echo "<font color='red'><strong>" .$ip. "Offline!</strong></font>";
}
else
{
echo "<font color='green'><strong>" .$ip. "Online!</strong></font>";


fclose($socket);
}
}

?>
Mach mal sonst var_dump($_POST); falls es nicht geht.
JPGaming is offline  
Old 08/08/2012, 11:07   #3
 
kissein's Avatar
 
elite*gold: 0
Join Date: Sep 2005
Posts: 426
Received Thanks: 87
Bisschen den Code optimiert, sollte aber auch in Deiner Version lauffähig sein.

PHP Code:
<?php 
if (isset($_POST["submit"]) && !empty($_POST['ip'])){ 
    
$ip trim($_POST['ip']);
    
$socket = @fsockopen($ip80NULLNULL30)
    if (!
$socket
        echo 
"<font color='red'><strong>" .$ip" Offline!</strong></font>"
    else{ 
        echo 
"<font color='green'><strong>" .$ip" Online!</strong></font>"
        
fclose($socket); 
    } 
}
?>
kissein is offline  
Old 08/08/2012, 11:46   #4


 
DasPrinzip.'s Avatar
 
elite*gold: 727
Join Date: Feb 2012
Posts: 1,207
Received Thanks: 303
Ja ich hatte einen Denkfehler Hatte in dem Script das ich auf meinem Webspace hatte dem Submitbutton nicht den Namen submit zugewießen. Klappt alles Danke trotzdem
DasPrinzip. is offline  
Reply


Similar Threads Similar Threads
Ich verzweifle bei diesem Mule Script
06/02/2012 - Diablo 2 Programming - 8 Replies
hallo zusammen, ich weiss nicht was da nicht funktioniert aber ich habe nun sicher 2stunden verschwendet daran, unter anderem weil ich gesehen habe, dass meinem kolleges paladin nicht DIABLO_test sonder dlablo_test heisst .......................... wie schon gesagt probiere ich das auto-mulen einzurichten: NTConfig_Druid_name sieht so aus(jedenfalls der wichtige teil oder?): // Set to true to enable auto mule. MWConfig_Automule.Activated = true;
Farge zu diesem Script
01/31/2011 - AutoIt - 2 Replies
Closen plz
Was ist mit diesem Code falsch?! -_-
09/19/2010 - General Coding - 1 Replies
Hi, bin wohl neu hier in der Section. Kein Wunder. Ich habe nun einigermaßen den Dreh raus mit Hackcoding und der erste geht schief. Wollte einen CA-EU Hack machen. Die LTC Addy ist eig. richtig und die PTC's eig auch... Was ist falsch? CA schließt beim Ladebildschirm. #include <windows.h> bool IsGameReadyForHook() { if( GetModuleHandleA( "d3d9.dll" ) != NULL && GetModuleHandleA( "ClientFX.fxd" ) != NULL && GetModuleHandleA( "CShell.dll" ) != NULL )
Was ist in diesem Script der Fehler [AutoIt v3]
06/30/2010 - AutoIt - 6 Replies
Was ist hier drin der Fehler Wie muss ich die Funktionen schreiben ? GuiCreate("Starter & Closer by KiLL",404,305,672,185) $button1=GuiCtrlCreateButton("Closer by KiLL",72,49,253,86) $button2=GuiCtrlCreateButton("Starter by KiLL",86,191,242,64) GuiSetState() While 1 $msg=GuiGetMsg()
Was ist in diesem Script der Fehler [AutoIt v3]
06/29/2010 - Main - 3 Replies
GuiCreate("Starter & Closer by KiLL",404,305,672,185) $button1=GuiCtrlCreateButton("Closer by KiLL",72,49,253,86) $button2=GuiCtrlCreateButton("Starter by KiLL",86,191,242,64) GuiSetState() While 1 $msg=GuiGetMsg() If $msg=-3 Then Exit If $msg=$button1 Then button1() If $msg=$button2 Then button2()



All times are GMT +2. The time now is 11:27.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.