Jump to content
MakeWebGames

Isomerizer

Members
  • Posts

    1,170
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Isomerizer

  1. Re: Cash Send Logs cashsend.php? Dont you meen sendcash.php? :wink: Anyways it works a treat thank you. +1
  2. Re: DB Error!? False alarm, apparently my DB needed a SQL repair. Caused by: "your database was in need of repair and the configuration was invalid with an invalid username in which may have led to the curroption" :?
  3. Re: DB Error!? Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'amazonsu'@'localhost' (using password: YES) in /home/amazonsu/public_html/mysql.php on line 3 Access denied for user 'amazonsu'@'localhost' (using password: YES) Getting that now prolly been hacked :(
  4. Well i logged into my game today to find Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/amazonsu/public_html/header.php on line 110 Got error 127 from storage engine Ive done nothing recently to header.php or to the DB and this recently started coming up, now my whole site wont work basically. Any idea what this meens? How i can fix it? Im also currently talking to my host seeing if this error could be down to him.
  5. Re: [FREE]Music system LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns LostOne fooking pwns
  6. Re: [Free] [v1] Profile Image Uploader   Parse error: syntax error, unexpected '}', expecting ',' or ';' in not/telling/you/this/bit!!/public_html/uploadpic.php on line 36 Was missing a ; fixed now.
  7. Re: [Free] [v1] Help Bot     Lol, its simple click light under the users ratings / karma.
  8. Re: Contact Staff Form [FREE]   Yes you did, in other v2 conversions ive seen before the mysql query they have something like $db->
  9. Re: [Free] [v1] Profile Image Uploader   What errors you get zaver?
  10. Re: [Free] [v1] Profile Image Uploader   Thanks seanybob ive updated the script now so it runs better :)   It still works if it isnt set to 666 / 777
  11. Re: Contact Staff Form [FREE]   Probaly where bullet didnt convert it properly....
  12. Re: Contact Staff Form [FREE] Woah you deleted   session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); and replaced it with include "globals.php";   Genius. :roll:
  13. Hey, made this mod for my game, so as usual i'll post here, Works fine for me... this mod will add an image upload for profile pics on your game, to stop several exploits, This improves security (hopefully) :P. Follow th below instructions and it should go fine. Update ASAP, Mass security updates have been added. Updates: -Code stripped from files uploaded. -Will stop bad file extensions, such as shells. -2nd Security update. -Only one image can be on the web server per user. -Images cannot be used more then twice to save space. -Crons / Extra SQL is no longer needed. -Security update. -Variables Fixed. Before you do the below on your FTP under public_html create a new directory called "profilepics" with the CHMOD permissions set to 757. Create uploadpic.php with the code:   <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 © Isomerizer.com -- uploadpic.php -----------------------------------------------------*/ require("globals.php"); if(empty($_FILES['imagefile'])) { echo ' Upload an Profile Image: [i]Path of Image:[/i] (Max 10000 file bytes , Must be file extention gif, jpg, jpeg, png, bmp....) (Images are resized to 150 x 150) '; } else { //Edit below for max fb size of the pic $maxsize = 1000000; /*Basic security procedures*/ if(!$_SERVER['REQUEST_METHOD'] == "POST" || !isset($_SERVER['HTTP_USER_AGENT'])){ echo 'Hack Attempt!'; $h->endpage(); exit; } $headerinject = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:"); foreach($_POST as $k => $v){ foreach($headerinject as $v2){ if(strpos($v, $v2) !== false){ logBadRequest(); header("HTTP/1.0 403 Forbidden"); exit; } } } /*What extensions can be used?*/ $valid = array('image/gif', 'image/png', 'image/pjpeg','image/jpeg', 'image/jpg'); /*If the extension isnt allowed...*/ if(!in_array($_FILES['imagefile']['type'], $valid)) { $type = strrchr($_FILES['imagefile']['name'], '.'); echo 'This file type '.$type.' is not allowed. [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Check image size*/ if ($_FILES['imagefile']['size'] > $maxsize) { echo 'Image to large [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $check = ''.$_FILES['imagefile']['tmp_name'].''; /*Check for .exe files*/ if (is_executable($check) || !is_file($check)) { echo 'The file '.$_FILES['imagefile']['name'].' seems to be harmful to the server [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; @unlink($check); $h->endpage(); exit; } /*Now to create the correct image using php*/ if ($_FILES['imagefile']['type']=="image/jpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/png") { $create = @ImageCreateFromPNG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagepng($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/jpg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/gif") { $create = @ImageCreateFromGIF(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagegif($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/pjpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } /*Destroy the php image*/ @unlink(''.$_FILES['imagefile']['tmp_name'].''); @ImageDestroy($create); /*If php could not create the image*/ if (!$create) { echo 'The image you are trying to upload seems to be corrupt please try again! [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $path = 'profilepics/'; $pic = $_FILES['imagefile']['name']; $picture = $path.$pic; $oldpic = $ir['display_pic']; /*Check to see if its already uploaded*/ if ($picture == $oldpic) { echo ' Image already uploaded![url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Delete previous image to save space*/ $delete = @unlink($oldpic); if ($delete) { echo 'Previous image deleted from system... '; } if (!$delete) { echo 'No Previous image to be deleted... '; } $dataa = $_FILES['imagefile']['size']; $datab = $_FILES['imagefile']['type']; $datad = $_FILES['imagefile']['name']; /*Information for user*/ echo 'Old Image Location: '.$oldpic.' New Image Location: '.$picture.' Image Uploaded Info: Image Name: '.$datad.' Image Size: '.$dataa.' bytes Type: '.$datab.' [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; /*Check DB*/ $check = mysql_query( sprintf("SELECT COUNT(*) as cnt FROM `users` WHERE `display_pic` = '%s'", mysql_real_escape_string($picture))); $checks = mysql_fetch_array($check); if ($checks['cnt'] > 0) { echo 'Please use another image name [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Update DB*/ mysql_query( sprintf("UPDATE `users` SET `display_pic` = '%s' WHERE `userid` = %u", mysql_real_escape_string($picture), $userid)); } $h->endpage(); exit; ?>   Open preferences.php and change   [url='preferences.php?action=picchange']Display Pic Change[/url]   To...   [url='uploadpic.php']Display Pic Change[/url]   Delete from preferences.php   function pic_change() { global $ir,$c,$userid,$h; print "Pic Change Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. Any images that are not 150x150 will be automatically resized New Pic: "; } function do_pic_change() { global $ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); mysql_query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid",$c); print "Pic changed!"; }   For extra security, "profilepics" directory can be stopped from executing any script. Create sseccath. <- (spelt backwards, as CE wont allow the word) with:   # AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi Options -ExecCGI   and place in "profilepics". Can be seen working @ www.amazon-survival.com
  14. Re: [Free] [v1] Help Bot Update: The bot now records questions asked, If you dont want this ignore the SQL, and remove mysql_query("INSERT INTO `bot` ( `ID` , `submitted` , `question` ) VALUES ( LCASE( NULL ) , '$userid', '$question')"); }
  15. Re: 3 Word Game actually the answer...
  16. Re: [Free] [v1] Jail Updated, Few bugs fixed. And a few more small features. :)
  17. Re: [Free] Password reset code Ahh i removed "@$send" and it works, Thanks +1
  18. Re: [Free] [v1] Help Bot   Thanks, Updated first post :wink:
  19. Re: [FREE][CRYSTAL GYM] Didnt work for me :S So i made my own www.isomerizer.com/mods.php :)
  20. Re: [Free] Password reset code Dont think it works, tryed it out didnt recieve no email :|
  21. Re: Left and right hand menu?   Those pages are missing </table> tags at the end of the pages (before $h->endpage() call) so the layout doesn't close right. Adding said </table> tags will fix this issue. Gah why didnt i think of that, Thanks dabomstew, +1
  22. Re: v3 game engine I'll still keep with v1! =D
  23. Re: 3 Word Game and was informed
  24. Re: Left and right hand menu? I had some parts of the mainmenu on the right and it looked fine, until i clicked things like Mail, Friends list & Black list, and it moves from the right to the bottom of the page. :|
  25. Re: Why is one of my domains estimated so high?   Ahh i thought it was too good to be true.
×
×
  • Create New...