• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fake PHP functions & scripts

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
Post PHP scripts with your own PHP Language :)

A fast example I made
PHP:
<?php

if(isMyThread($user)) {
	echo $user .'s thread';
}
?>

Another one
PHP:
$host = 'localhost';
$user = 'zonet';
$password = '*********';
	browser_connect_otland();
		if(browser_connect_otland() == true) {
			$loginOtL = browser_login_otland($user, $password);
		}
			else {
				errorMsg 'Could not connect!'. otland_error();
			}
		if($loginOtL) {
			succesMsg 'Logged in!';
			moveTo('forum.php');
		}
			else {
				errorMsg 'Wrong username or password!';
			}
			
?>
:thumbup:
 
Last edited:
wat

PHP:
<?php
	/* * * * * * * *
	 * C O N F I G *
	 * * * * * * * */
	
	$action = $_GET['action'];
	$page = $_GET['page'];
	$id = $_GET['id'];
	$get = $_GET['get'];
	$dir = $_GET['dir'];
	$imagesPerPage = 5;
?>
<html>
	<head>
		<title>Online Gallery</title>
		<style>
			body { background-color: black; color: white; }
			a:visited { text-decoration: none; color: white; }
			a:hover { text-decoration: underline; color: white; }
			a { text-decoration: none; color: white }
		</style>
	</head>
	
	<body>
<?php
    function createName($length = 6)
    {
        $pattern = 'abcdefghijklmnoprstwquxyzv1234567890';
        $max = strlen($pattern) - 1;
        $random = '';
        mt_srand((double)microtime() * 1000000);
        for($i = 0; $i < $length; $i++)
            $random .= $pattern[mt_rand(0, $max)];
            
        if(file_exists("./images/{$random}"))
            return createName();

        return $random.'.zip';
    }
	
	function removeOldZips($minutes = 10)
	{
		//todo....... :(
		return true;
	}
	
	removeOldZips();
	
	$zip = new ZipArchive();
	$name = createName();

	//Bla bla
	if(empty($action) || !in_array($action, array("zip", "view", "img")))
		$action = "view";
		
	if(empty($page) || !is_numeric($page))
		$page = 1;
	
	//Bla bla
	if(strtolower($action) == "zip" && !empty($dir))
	{
		if(strpos($dir, "./"))
		{
		      echo "fuuuu";
		      $skipZip = true;
		}

		if(!$skipZip)
		{
		    if($zip->open("./zips/{$name}", ZIPARCHIVE::CREATE) !== false)
		    {
			    if($handle = opendir("./images/{$dir}"))
			    {
				    while(($file = readdir($handle)) !== false)
					    if(!in_array($file, array(".", "..")))
						    if(!is_dir($file))
							    $zip->addFile("./images/{$dir}/{$file}", $file);
							    
				    closedir($handle);
			    }

			    $zip->close();
			    
			    echo "<a href=\"./zips/{$name}\">Your package is ready.</a>";
		    }
		    else
			    echo "Something went wrong... Try again.";
		}
	}
	else if(strtolower($action) == "img")
	{
		echo "<center><a href=\"?action=view\">Go back.</a></center>";
		
		if(!$dir || !$id)
			echo "<center>Image not found!</center>";
		else
			if(file_exists("./images/{$dir}/{$id}"))
				echo "<img src=\"./images/{$dir}/{$id}\" alt=\"{$id}\" />";
			else
				echo "<center>Image not found!</center>";
	}
	else if(strtolower($action) == "view")
		if(!$dir)
		{
			if($handle = opendir("./images"))
			{
				while(($file = readdir($handle)) !== false)
					if(!in_array($file, array(".", "..")))
						if(!is_dir($file))
							echo "<a href=\"?action=view&dir={$file}\">{$file}</a><br />";
							
				closedir($handle);
			}
		}
		else
			if($handle = opendir("./images/{$dir}"))
			{
				$files = array("");
			
				while(($file = readdir($handle)) !== false)
					if(!in_array($file, array(".", "..")))
						if(!is_dir($file))
							$files[] = $file;
							
				closedir($handle);
				
				if($files)
				{
					echo "<a href=\"?action=zip&dir={$dir}\">Zip This Category!</a><br />";
					
					$pages = ceil(count($files) / $imagesPerPage);
		
					if($page > $pages)
						$page = 1;

					$s = $page == 1 ? 1 : $page * $imagesPerPage - $imagesPerPage + 1;
					$next = $page + 1;
					$previous = $page - 1;
		
					for($i = $s; $i < $s + $imagesPerPage; $i++)
						if(!empty($files[$i]))
							if($i % 5 == 0)
							{
								$br = false;
								echo "<a href=\"?action=img&amp;dir={$dir}&amp;id={$files[$i]}\"><img src=\"./images/{$dir}/{$files[$i]}\" alt=\"{$files[$i]}\" title=\"\" height=\"320\" width=\"240\" border=\"0\" /></a><br />";
							}
							else
							{
								echo "<a href=\"?action=img&amp;dir={$dir}&amp;id={$files[$i]}\"><img src=\"./images/{$dir}/{$files[$i]}\" alt=\"{$files[$i]}\" title=\"\" height=\"320\" width=\"240\" border=\"0\" /></a> ";
								$br = true;
							}
						else
							break;
							
					if($br)
						echo '<br />';
						
					if($page > 1)
						echo "<a href=\"?action=view&amp;dir={$dir}&amp;page={$previous}\">Previous Page</a>";
						
					if($pages > $page && $page > 1)
						echo " | ";
						
					if($pages > $page)
						echo "<a href=\"?action=view&amp;dir={$dir}&amp;page={$next}\">Next Page</a>";
				}
				else
					echo "This category is empty.";
						
			}
			else
				echo "wtf zi000000000000m";
?>
	</body>
</html>
gud?
 
uhmm??

PHP:
<?php
     class ZonetIdjut {
          public $zonet = array('idjut' => array('hi', 'bye', 'idjut'), 'wtf' => 'what do you mean by this thread ????');
          public function __construct() {
               if(count($this->zonet, COUNT_RECURSIVE) >= 6) {
                    echo '<pre>';
                    print_r($this->zonet);
                    echo '</pre><br />wtf?';
               } else {
                    echo '...';
               }
          }
     }
?>


I know, this didn't make any sense :S.. Just did something ;\

EDIT:

Better tab your second example (first post) properly:

PHP:
<?php
	$user = 'zonet';
	$password = '*********';
	browser_connect_otland();
	if(browser_connect_otland() == true) {
		$loginOtL = browser_login_otland($user, $password);
	} else {
		errorMsg 'Could not connect!'. otland_error();
	}
	if($loginOtL) {
		succesMsg 'Logged in!';
		moveTo('forum.php');
	} else {
		errorMsg 'Wrong username or password!';
	}
?>

And, you used 'moveTo'. There's actually an existing function for that purpose. It's called header(). Instead of 'moveTo('forum.php');' you'd have 'header('Location: forum.php');'

Also, you didn't use your set variable '$host'.
 
Last edited:
PHP:
<start>
+\<if ##hack z/on)et (the/n fi#ve password" //&lolololisuckcock.com)>
<end>
 
uhmm??

And, you used 'moveTo'. There's actually an existing function for that purpose. It's called header(). Instead of 'moveTo('forum.php');' you'd have 'header('Location: forum.php');'

Also, you didn't use your set variable '$host'.
I know that about header... this thread is called fake functions :) I like your script without the text ^_^
 
Code:
<?php
if(isInGoogle(getPostAbove())) { submitPost("Google: ".getGoogleLinkFor(getPostAbove()); }
?>
 
PHP:
<?php

	function FatalError(){
		throw new exception('Dont catch me please :(');
	}

?>

|1337 posts!
 
PHP:
<?php

if ( $_GET['noob'] )
{
	Switch( $_GET['noob'] )
	{
		case 'Zonet':
		echo 'This person is a nub!';
		break;
		
		default:
		echo 'This person rocks. Just like everyone else except Zonet!';
	}
}


?>
 
PHP:
<doctypedeclaration="php">
if(Youarelookingforfirends)
{
execute -> You can find some here :o
Ifnot
execute -> You have friends :o
}
</php>

A rooofl xd
 
ey is not fake :S

you just confessed ur a nuub :peace:


PHP:
<?php

if(colandus_ate_apple()) {
    if(apple_is_extra_delicious()) {
        colandus_say("I'm an allergic, but fuck it this is some sweet shit!!");
    } elseif(apple_is_OK()) {
        colandus_say("God damn my throat swell!!");
    } else {
        colandus_throw_up();
    }
}

?>
 
PHP:
<?php

if ( $_GET['noob'] )
{
	Switch( $_GET['noob'] )
	{
		case 'Zonet':
		echo 'This person is a nub!';
		break;
		
		default:
		echo 'This person rocks. Just like everyone else except Zonet!';
	}
}
[/QUOTE]
omg it could be much easier to do this, without switch()
[php]
<?php
	if( $_GET['noob'] == "Zonet" )
		echo "This Person is noob";
	else
		echo "Bestek!!!";
?>
 
Back
Top