External Session Protector (V26)

Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    something Erlend is offline
    MemberRank
    Dec 2007 Join Date
    Oslo, NorwayLocation
    791Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by maritnmine View Post
    In fact, I use the htaccess system =) But it would be to advanced to explain people how to activate the rewrite modue in the config file x)

    Martin

    Edit:
    Why does people post posts at norwegian??
    Fordi du er norsk??
    -
    Because you are Norwegian..


  2. #17
    Account Upgraded | Title Enabled! yifan_lu is offline
    MemberRank
    Jun 2007 Join Date
    Next to a computer screenLocation
    692Posts

    Re: External Session Protector (V26)

    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).

    Quote Originally Posted by Hejula View Post
    Please can anyone with PHP knowledge tell me how I can do this for the external_texts aswell.. But keeping them in the external.php file :) thanks.. So the link would be www.host.com/external.php?id=external_texts though (: Thankss
    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):
    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');
    }
    ?>
    If you know how to use mod_rewrite, then make .htaccess remove the .php.

    Also, if you don't want to include the txt file, then instead:
    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
    }
    ?>
    This is exactly how habbo does it, anything other "id" would result in a blank page.

  3. #18
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by emineem View Post
    Fordi du er norsk??
    -
    Because you are Norwegian..

    But, this is an english forum where we speak english not norwegian x)

    Quote Originally Posted by yifan_lu View Post
    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):
    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');
    }
    ?>
    If you know how to use mod_rewrite, then make .htaccess remove the .php.

    Also, if you don't want to include the txt file, then instead:
    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
    }
    ?>
    This is exactly how habbo does it, anything other "id" would result in a blank page.
    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

  4. #19
    something Erlend is offline
    MemberRank
    Dec 2007 Join Date
    Oslo, NorwayLocation
    791Posts

    Re: External Session Protector (V26)

    Well anyways.. this is very nice.. and sadly, i got no retro so i don't need it.. but its very nice.

  5. #20
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: External Session Protector (V26)

    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

  6. #21
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: External Session Protector (V26)

    What's the differce between require_once("blabl"); and include("blabla");?

  7. #22
    The Omega Superfun is offline
    MemberRank
    Dec 2006 Join Date
    The NetherlandsLocation
    5,227Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by maritnmine View Post
    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
    wrong, they can actually.

  8. #23
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by Superfun View Post
    wrong, they can actually.
    Oh, now I see what I was doing wrong, If I used require_one("blabl"); instead of have the extarnals inside the file, it would work --,"

    Martin

  9. #24
    Chasing 99 Red Balloons Jordan is offline
    MemberRank
    Jan 2008 Join Date
    UKLocation
    1,763Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by Hejula View Post
    Please can anyone with PHP knowledge tell me how I can do this for the external_texts aswell.. But keeping them in the external.php file :) thanks.. So the link would be www.host.com/external.php?id=external_texts though (: Thankss
    PHP Code:
    <?php
    $e 
    $_GET['id'];
    if (
    $e == "external_texts") {
    include_once 
    'external_texts.txt'

    else if (
    $e == "external_variables") {
    include_once 
    'external_variables.txt'; }
    else {
    echo 
    "fagot"
    }
    ?>

  10. #25
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by Lord Jordan View Post
    PHP Code:
    <?php
    $e 
    $_GET['id'];
    if (
    $e == "external_texts") {
    include_once 
    'external_texts.txt'

    else if (
    $e == "external_variables") {
    include_once 
    'external_variables.txt'; }
    else {
    echo 
    "fagot"
    }
    ?>
    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"
    }
    ?>

  11. #26
    Account Upgraded | Title Enabled! AWA is offline
    MemberRank
    Feb 2008 Join Date
    1,320Posts

    Re: External Session Protector (V26)

    Martin likes pie. Thank you Martin! Gonna use it!

  12. #27
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: External Session Protector (V26)

    Quote Originally Posted by awa500 View Post
    Martin likes pie. Thank you Martin! Gonna use it!
    How did you know that? :O



Page 2 of 2 FirstFirst 12

Advertisement