[Release] Ingamechat Php Script

01/14/2012 13:02 masdenqqq#1
hey epvp

I share a script I wrote recently ,

I apologize if shared ..

PHP Code:
<?php 
error_reporting
(1);
    
define("MSQL_HOST""ip"); 
    
define("MSQL_USER""user"); 
    
define("MSQL_PASS""pass"); 
     
    
$connect = @mysql_connect(MSQL_HOSTMSQL_USERMSQL_PASS);     
    if(
$connect){ 
        
$limit 15
        
$sqlCmd "SELECT `3` as 'empire',`4` as 'shout',`1` as 'msgTime' FROM log.shout_log ORDER BY msgTime DESC LIMIT ".$limit
        
$sqlQry mysql_query($sqlCmd); 
        echo 
'<table><tr><th>Date</th><th>Post</th></tr>'
        while(
$row mysql_fetch_object($sqlQry)){ 
            echo 

                <tr> 
                    <td> 
                        '
.$row->msgTime.
                    </td> 
                    <td> 
            '

                if(
$row->empire == 1){ 
                    echo 
'<span style="color:red;">'.htmlspecialchars($row->shout).'</span>'
                } elseif(
$row->empire == 2){ 
                    echo 
'<span style="color:yellow;">'.htmlspecialchars($row->shout).'</span>'
                } elseif(
$row->empire == 3){ 
                    echo 
'<span style="color:blue;">'.htmlspecialchars($row->shout).'</span>'
                } 
            echo 

                    </td> 
                </tr> 
            '

        } 
        echo 
'</table>'
    } else { 
        echo 
"Error connecting to server"
    } 
?>
01/14/2012 15:34 IchVerabschiedeMich#2
Useless but nice idea!
01/14/2012 16:23 ixel4#3
Help me pls


Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/26/d364543118/htdocs/pages/online.php on line 2

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /homepages/26/d364543118/htdocs/pages/online.php on line 2

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/26/d364543118/htdocs/pages/online.php on line 3

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /homepages/26/d364543118/htdocs/pages/online.php on line 3

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /homepages/26/d364543118/htdocs/pages/online.php on line 3

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /homepages/26/d364543118/htdocs/pages/online.php on line 26
Date Post
01/14/2012 16:30 IchVerabschiedeMich#4
Quote:
Originally Posted by ixel4 View Post
Help me pls


Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/26/d364543118/htdocs/pages/online.php on line 2

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /homepages/26/d364543118/htdocs/pages/online.php on line 2

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/26/d364543118/htdocs/pages/online.php on line 3

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /homepages/26/d364543118/htdocs/pages/online.php on line 3

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /homepages/26/d364543118/htdocs/pages/online.php on line 3

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /homepages/26/d364543118/htdocs/pages/online.php on line 26
Date Post
Ich habe grade 3 vServer und auf keinem nen Webserver um das zu testen...
Lold

Ich teste das script mal.
01/14/2012 16:31 Kugelsicher#5
Werd ich auf meinem Server bzw. auf der Homepage meines Servers einbauen. Danke ;-)
01/14/2012 16:32 ixel4#6
Ok ich habe alles richtig gemacht aber kp wiesoe diese fehler meldung kommt
01/14/2012 16:49 akalod#7
as like [Only registered and activated users can see links. Click Here To Register...] (:
01/14/2012 16:52 IchVerabschiedeMich#8
Wenn ich recht überlege könnte man damit doch ne xss Lücke erzeugen o.O
01/14/2012 16:55 SayanorA#9
I saw it. 2 weeks ago metin2mad [Only registered and activated users can see links. Click Here To Register...]
01/14/2012 17:00 ixel4#10
hmm aber wieso geht das den nciht bei mit weist das jemand ?
01/14/2012 17:16 IchVerabschiedeMich#11
Quote:
Originally Posted by ixel4 View Post
hmm aber wieso geht das den nciht bei mit weist das jemand ?
Kp geht bei mir auch net.
Denke Querys sind falsch kenne mich mit php net so aus.
01/14/2012 17:56 ixel4#12
ahso ok danke egal dann wolte nur wiessen ob das nur bei mir so ist
01/14/2012 18:04 IchVerabschiedeMich#13
Quote:
Originally Posted by ixel4 View Post
ahso ok danke egal dann wolte nur wiessen ob das nur bei mir so ist
3. Query ist falsch.
Also bei jedem so :)

Zeile 24 mit dem ersetzen:
PHP Code:
        $sqlCmd "SELECT `3` as 'empire',`4` as 'shout',`1` as 'msgTime' FROM log.shout_log ORDER BY msgTime DESC LIMIT ".$limit

Danke @ Mythen

Vorsicht XSS Lücke!
01/14/2012 18:07 lautlosertot#14
iost vom anderen forum^^
01/14/2012 18:20 #SoNiice#15
Quote:
Originally Posted by lautlosertot View Post
iost vom anderen forum^^
Dann sag uns doch auch direkt von welchem Forum, mit Link, sonst ist's nur Spam.