Upload

Started on the old forum in November 2007 · view the original in the archive · old links redirect here

2 replies · 501 views · started 19 years ago · 1 min read

2 participants
crazybrumi Super moderator Principal · 1,064 posts #1

ANYONE NOW HOW TO RESTRICT FILES LIKE PHP,HTML,ASP,ASPX ETC FROM BEING UPLOADED USING THIS IV TRIED A FEW METHODS BUT THEY HAVE BEEN ANY GOOD THANKS !

$Connect = mysql_connect("$server","$user","$pass");
mysql_select_db("$dbname");
$result=mysql_query("select * from members where username='$username' and password='$password'");
$number_of_rows = mysql_num_rows($result);
if ($number_of_rows>0)
{
    include("../check.inc.php");
}
if ($ok>0)
{

if($action=="upload")
{
echo "[b]Upload![/b]
";
echo "~=~=~=~=~
";

   echo "<form align=\"center\" action=\"up.php?action=updone&username=$username&password=$password&cat=$cat\" method=\"post\" ENCTYPE=\"multipart/form-data\">";
   echo "File: <input type=\"file\" name=\"fpic\" size=\"30\"/>
";
   echo "<input type=\"submit\" value=\"Upload!\"/>";
   echo "</form>";
echo "~=~=~=~=~
";
echo "<a title=\"Enter\" href=\"cat.php?username=$username&password=$password&cat=$cat\">Back</a>";
}
else if($action=="updone")
{

echo "[b]Uploaded![/b]
";
echo "~=~=~=~=~
";
if($fpic=="")
{
echo "error";
}
else
{

    $file = $_FILES["fpic"];
    if(is_uploaded_file($file["tmp_name"]))
    {
        move_uploaded_file($file["tmp_name"], "$cat/".$file["name"]);
    }
  
$furl = "$cat/".$file["name"]."";

$sql = "INSERT INTO gal (username,cat,link) VALUES
('$username','$cat','$furl')";
$result = mysql_query($sql);
}
echo "<a title=\"Enter\" href=\"cat.php?username=$username&password=$password&cat=$cat\">Back</a>";

}

}
echo "</p>"; 
echo "</card>"; 
echo "</wml>"; 
?>

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

subzero Super moderator Fellow · 3,954 posts #2
$Connect = mysql_connect("$server","$user","$pass");
mysql_select_db("$dbname");
$result=mysql_query("select * from members where username='$username' and password='$password'");
$number_of_rows = mysql_num_rows($result);
if ($number_of_rows>0)
{
    include("../check.inc.php");
}
if ($ok>0)
{

if($action=="upload")
{
echo "[b]Upload![/b]
";
echo "~=~=~=~=~
";

   echo "<form align=\"center\" action=\"up.php?action=updone&username=$username&password=$password&cat=$cat\" method=\"post\" ENCTYPE=\"multipart/form-data\">";
   echo "File: <input type=\"file\" name=\"fpic\" size=\"30\"/>
";
   echo "<input type=\"submit\" value=\"Upload!\"/>";
   echo "</form>";
echo "~=~=~=~=~
";
echo "<a title=\"Enter\" href=\"cat.php?username=$username&password=$password&cat=$cat\">Back</a>";
}
else if($action=="updone")
{

echo "[b]Uploaded![/b]
";
echo "~=~=~=~=~
";
if($fpic=="")
{
echo "error";
}
else
{

    $file = $_FILES["fpic"];
$file = str_replace("php","+",$file);
$file = str_replace("asp","+",$file);
$file = str_replace("aspx","+",$file);
$file = str_replace(" ","20%",$file);
    if(is_uploaded_file($file["tmp_name"]))
    {
        move_uploaded_file($file["tmp_name"], "$cat/".$file["name"]);
    }

  
$furl = "$cat/".$file["name"]."";

$sql = "INSERT INTO gal (username,cat,link) VALUES
('$username','$cat','$furl')";
$result = mysql_query($sql);
}
echo "<a title=\"Enter\" href=\"cat.php?username=$username&password=$password&cat=$cat\">Back</a>";

}

}
echo "</p>"; 
echo "</card>"; 
echo "</wml>"; 
?>

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close