Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php include('includes/database.php'); include('session.php'); if (!..
Decoded Output download
<?php
include('includes/database.php');
include('session.php');
if (!isset($_FILES['image']['tmp_name'])) {
echo "";
}else{
$file=$_FILES['image']['tmp_name'];
$image = $_FILES["image"] ["name"];
$image_name= addslashes($_FILES['image']['name']);
$size = $_FILES["image"] ["size"];
$error = $_FILES["image"] ["error"];
if ($error > 0){
die("Error uploading file! Code $error.");
}else{
if($size > 10000000) //conditions for the file
{
die("Format is not allowed or file size is too big!");
}
else
{
move_uploaded_file($_FILES["image"]["tmp_name"],"upload/" . $_FILES["image"]["name"]);
$location="upload/" . $_FILES["image"]["name"];
$user=$_SESSION['id'];
$update=mysql_query(" INSERT INTO photos (location,user_id,date_added)
VALUES ('$location','$id',NOW()) ") or die (mySQL_error());
}
header('location:photos.php');
}
}
?>
Did this file decode correctly?
Original Code
<?php
include('includes/database.php');
include('session.php');
if (!isset($_FILES['image']['tmp_name'])) {
echo "";
}else{
$file=$_FILES['image']['tmp_name'];
$image = $_FILES["image"] ["name"];
$image_name= addslashes($_FILES['image']['name']);
$size = $_FILES["image"] ["size"];
$error = $_FILES["image"] ["error"];
if ($error > 0){
die("Error uploading file! Code $error.");
}else{
if($size > 10000000) //conditions for the file
{
die("Format is not allowed or file size is too big!");
}
else
{
move_uploaded_file($_FILES["image"]["tmp_name"],"upload/" . $_FILES["image"]["name"]);
$location="upload/" . $_FILES["image"]["name"];
$user=$_SESSION['id'];
$update=mysql_query(" INSERT INTO photos (location,user_id,date_added)
VALUES ('$location','$id',NOW()) ") or die (mySQL_error());
}
header('location:photos.php');
}
}
?>
Function Calls
None |
Stats
MD5 | de8211d7607c6f37a6805f209e0753af |
Eval Count | 0 |
Decode Time | 96 ms |