Jump to content

SG1

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

SG1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm pretty new in php and I need some help from you pro's out there :-) To give you a good picture of what i want to do i will try to explain what it is for too. I am playing a game where there are some mobs spawning every now and then. These are displayed by js on all the pages in the game in their "toolbar" where you also get all other info relevant to your character, by mouseover... i figure you have already guessed this a password protected site. So i now want to make a script that logs on from another domain get the mobs and if there are changes a pop up notifies you there is a new mob spawned. So here is what I THINK I need to do 1. Access the site 2. Search the site through the page home.php for the names of these mobs. ( guess a new search about every 30 sec) 3. If there are anyone that has spawned since the last search make an alert. Problem is i have no idea of how to do this and i figure it all won't be done with php alone... don't expect you guys to make a script for me, but to show me the ropes so i can find out how to do this. :-) Thanks alot everyone
  2. Hey, i got a login script from evolt.org with admin feature made bu jpmaster77. The problem i am having is that pages that should be only available to some users is avaiable to all. What happens when you are not authorized to wiev it it just log in as guest and you can see it. I'm not sure what information you want, so i'll just post a few snippets, and just ask for whatever more you need :-) (process.php) -------------------------------------------------- function Process(){       global $session;       /* User submitted login form */       if(isset($_POST['sublogin'])) ...... /**       * Should not get here, which means user is viewing this page       * by mistake and therefore is redirected.       */       else{           header("Location: index2.php");       } Same if, just removed some elseif's ------------------------------------------------------------- Constants.php ------------------------------------------------------------- /**     * isAdmin - Returns true if currently logged in user is     * an administrator, false otherwise.     */   function isAdmin(){       return ($this->userlevel == ADMIN_LEVEL ||               $this->username  == ADMIN_NAME);   }     /**   *isLevel - Same function as isAdmin for users   */   function isLevel(){   return ($this->userlevel >= $level);   } Tried to add an isLevel to help secure.. dunno if it will help, but doesn't seem so :-) --------------------------------------------------------------------------------- i.e page3.php ----------------------------------------------------------------------------------- if($session->logged_in){ if($session->userlevel==X){   echo "<h1>Logged In</h1>";   echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"       ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>]<br> &nbsp;&nbsp;"       ."[<a href=\"useredit.php\">Edit Account</a>]<br> &nbsp;&nbsp;";   if($session->isAdmin()){       echo "[<a href=\"admin/admin.php\">Admin Center</a>]<br> &nbsp;&nbsp;";   }   echo "[<a href=\"process.php\">Logout</a>]<br>"; } } else{ ?> put in x in user level since there is 9 possibilities.. I have also tried without my "experiment, but it still log in as guest.. ----------------------------------------------------------------------- So, here is my question. How do i really make the script work like intended? (only specified user level can view the page(s) Hope anyone can help me. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.