Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

PHPRetro NEW Version PDO / PHP7 / CURL

Newbie Spellweaver
Joined
Jul 15, 2012
Messages
88
Reaction score
4
Hello i Make a New Version from the Old Projekt Phpretro. i Update all Mysql to PDO Connection and more


Features


* PDO
* XSS SQL SECURE
*Speed
* Old design
* no Notice and ERROR on logs


my test WEBSPACE

what else could you update?
 
Joined
Sep 10, 2011
Messages
778
Reaction score
138
Good luck man,
Just a few things that could help benefit this project (imo) and its up to you to do or not do!

Design
PHPRetro's original design is beautiful and benefits from the flashback to the good ol' days of Habbo. You should really keep this design including the original index, register and the additional quick-login page (Fresh has an example). Your current index page while nice, loses the benefits from the original :(

Tech Stack
Since this is only just a PHPRetro rewrite (I'm sure to modernize it) you should really try to put some OOP features into the stack. Things such as modeling your queries, data and so forth could make a huge impact and also help you in the long run for readability and adding on.

Other
I notice your 404's just throw a basic File Not Found You should really change that to use the template's 404 page! Would be neat.

Also, if you ever need any help or for anyone to traverse through your code feel free to send me a PM and I could do it myself or add you to a Discord full of other developers. (Kinda?) .

Image Album
 
Newbie Spellweaver
Joined
Jul 15, 2012
Messages
88
Reaction score
4
i make a language system



I do not know how to do that session or cookies


class HoloLocale {
var $loc = array();
function addLocale($keys){

if (isset($_GET['lang']))
{
switch ($_GET['lang']) {
case "en":
$key = $keys;
require('./includes/lang/en.php');
$this->loc = array_merge($this->loc,$loc);
break;
case "de":
$key = $keys;
require('./includes/lang/de.php');
$this->loc = array_merge($this->loc,$loc);
break;
case "fr":
$key = $keys;
require('./includes/lang/fr.php');
$this->loc = array_merge($this->loc,$loc);
break;
default:
$key = $keys;
require('./includes/lang/en.php');
$this->loc = array_merge($this->loc,$loc);
}
}
else
{
$key = $keys;
require('./includes/lang/en.php');
$this->loc = array_merge($this->loc,$loc);
}
 
Experienced Elementalist
Joined
Dec 30, 2010
Messages
204
Reaction score
23
What kind of XSS patches have you done so far?
Becuase I haven't encountered any exploits yet on phpretro.
Good luck man, hoping to play and witness the old days of habbo.
 
Newbie Spellweaver
Joined
Jul 15, 2012
Messages
88
Reaction score
4
Hmm phpretro Motto Name rooms


i have new update

URL System HTTP / HTTPS and Multi Domain

Transite System google :)
 
Newbie Spellweaver
Joined
Jul 15, 2012
Messages
88
Reaction score
4



Notice index Is not mine
 
Newbie Spellweaver
Joined
Jul 15, 2012
Messages
88
Reaction score
4
new version Azure


and the PDO class is very hard for me.

Code:
class pdomysql extends HoloDatabase {
	
	
	function query($query){
		$query = $this->connection->query($query);
		$query->execute();
		return $query;
	}
	function fetch_assoc($query){
		$result = $query->fetchAll(PDO::FETCH_ASSOC);
		if(defined('DEBUG')){ $error = mysqli_error($this->connection); if($result == false && !empty($error)){ echo $error . "<br />Query that errored: ".$this->lastquery; } }
		return $result;
	}
	function fetch_row($query){
		$result = mysqli_fetch_row($query);
		if(defined('DEBUG')){ $error = mysqli_error($this->connection); if($result == false && !empty($error)){ echo $error . "<br />Query that errored: ".$this->lastquery; } }
		return  $result;
	}
	function fetch_array($result,$result_type=0){
		$result = $result->fetchAll(PDO::FETCH_NUM);
		if(defined('DEBUG')){ $error = mysqli_error($this->connection); if($result == false && !empty($error)){ echo $error . "<br />Query that errored: ".$this->lastquery; } }
		return $result;
	}
	function num_rows($query){
		$result = $query->fetchColumn();
		if(defined('DEBUG')){ $error = mysqli_error($this->connection); if($result == false && !empty($error)){ echo $error . "<br />Query that errored: ".$this->lastquery; } }
		return $result;
	}
	function result($query,$row=0,$column=0){
		$result = mysqli_result($query,$row,$column);
		if(defined('DEBUG')){ if($result == false){ echo mysqli_error($this->connection) . "<br />Query that errored: ".$this->lastquery; } }
		return $result;
	}
	function insert_id($query=null){
		return mysqli_insert_id($this->connection);
	}
}

this is not good i know!
 
Joined
Dec 16, 2011
Messages
1,993
Reaction score
631
Wait, so what are your end goals? Are you planning to re-code parts the previous development of PHPRetro, or are you completely writing from scratch but using it as a base to copy from? From memory most of the code is deprecated & outdated.
 
Back
Top