For even more fun, you can make it so if you don't have the session, then every time the word Habbo come up, you can change it to something offensive. Also, a php-styled externals has lots of potential (I would code it into HoloCMS, but externals are not part of the site), you can do something like store every language externals into a file, and then using the magic of PHP and include, you can do like externals.php?type=texts&language=en or with mod_rewrite externals/texts/english or something like that. Also instead of sessions, you can use the Referrer header to do the check (although that's easier to fake, I don't think anyone wanting to steal your externals are smart enough to fake referrer).
I'm going to try to make this code without testing, so (first make external_texts.txt and external_variables.txt in the same folder as the php file):
If you know how to use mod_rewrite, then make .htaccess remove the .php.PHP Code:<?php
// Filename: external.php
$id = $_GET['id'];
if($id == "external_texts"){
require_once('./external_texts.txt');
}elseif($id == "external_variables"){
require_once('./external_variables.txt');
}
?>
Also, if you don't want to include the txt file, then instead:
This is exactly how habbo does it, anything other "id" would result in a blank page.PHP Code:<?php
// Filename: external.php
$id = $_GET['id'];
if($id == "external_texts"){
?>
YOUR EXTERNAL TEXTS HERE
<?php
}elseif($id == "external_variables"){
?>
YOUR EXTERNAL VARS HERE
<?php
}
?>
But, this is an english forum where we speak english not norwegian x)
The problem is that if you have TXT files inside a PHP file, all of the text would be in one sentence. Then the Habbo DCR's wont be able to read them. Therefore, we must click on the tab button in the end of every sentence.
Martin
Well anyways.. this is very nice.. and sadly, i got no retro so i don't need it.. but its very nice.
Perfect, I got it working by using yifans code and your code, I used yours to block the text from being seen, and yifans for the texts and vars in the same file :) thanks
What's the differce between require_once("blabl"); and include("blabla");?
You forgot to add the session protect system =)
PHP Code:<?php
$e = $_GET['id'];
if(empty($WhatToLoad) || empty($_SESSION['SERS']) || $_SESSION['SERS'] == "")
{
echo"You can't steal my vars! :D";
exit;
}
else if ($e == "external_texts") {
$_SESSION['SERS'] = "";
include_once 'external_texts.txt';
}
else if ($e == "external_variables") {
$_SESSION['SERS'] = "";
include_once 'external_variables.txt'; }
else {
echo "fagot";
}
?>
Martin likes pie. Thank you Martin! Gonna use it!