uploading its not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    uploading its not working

    help me about this error, my upload its not working. pls help me.

    this is my upload.php
    PHP Code:
    <?php

    echo("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n");

    ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"



    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

     <head>

      <meta http-equiv="Cache-Control" content="no-cache"/>

      <meta http-equiv="Cache-Control" content="must-revalidate"/>

        <title>MyChat</title>

        <link rev="made" href="mailto:prodigit@w5c.info" />      

    <link rev="start" href="./" title="Home Page" />    

    <link rel="shortcut icon" type="image/x-icon" href="img/ico.gif" />    

    <meta http-equiv="Cache-Control" content="must-revalidate" />    

    <meta http-equiv="Cache-Control" content="no-cache" />    

    <meta name="description" content="description" />    

    <meta name="keywords" content="Downloads mp3 amr 3gp poly Free South Africa afrikaans chat &amp; forums toplist services wapmasters" />



    <style type="text/css">
    a:link{color: #CCCC00;} 
    a:visited{color: #CCCC00;} 
    a:hover{color: #FFFFFF;background: #FF0000;} 
    a:active{color: #FFFFFF;background: #FF0000;} 
    a:focus{color: #FFFFFF;background: #FF0000;} 

    body

      color: #ffffff;
      border-width:0px 0;
      border-style:solid;
      border-color: #FFFFFF;
    background-image: 
    url('data/rocky.jpg');
    background-color: #000000;
    background-repeat: 
    repeat;
    background-position: 
     center; 
     background-attachment: 
    fixed
    }
     .txtmenus {
      background-color: #000033;
      padding: 2px 2px 2px 2px;
      margin: 3px 0 0;
      color: #CCCCCC;
      border-width:0px 0;
      border-style:solid;
      border-color: #FF0000;
     }
      .foot {
      background-color: #990000;
      padding: 2px 2px 2px 2px;
      margin: 3px 0 0;
      color: #ffffff;
      border-width:0px 0;
      border-style:solid;
      border-color: #FF0000;
     }

    </style>

     </head>

    <body>

    <center>

    <img src="data/logo.gif" alt="LOGO" />
    </center>

    <div class="txtmenu">
    <center><b><small>Upload</small></b></center>
    </div>
    <b>

    <small>



    <?php

    include ("config.php");

    include (
    "count.php");

    $brws explode(" ",$_SERVER[HTTP_USER_AGENT] );

    $ubr $brws[0];

    $ip=getenv('REMOTE_ADDR');

    $brws2mysql_fetch_array(mysql_query("SELECT * FROM ipban WHERE browser='".$ubr."' and ip='".$ip."'"));

    if (
    $brws2){

        echo 
    '<title>Uploader</title></head>

        '
    ;

        echo 
    "<p align=\"center\">";

        echo 
    "<img src=\"http://coding-talk.com/images/exit.gif\" alt=\"*\"/><br/>";

        echo 
    "If u see this this means your IP and browser has been banned from uploading<br/>";

        echo 
    "</p>";

        echo 
    "</body></html>";

        exit();

    }



    echo 
    '<title>Uploader</title></head>

    '
    ;



    if (
    $upload="upload"&&$superdat_name){





    if (!
    eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|mpn|nth|mpc|jar|jad|jpeg|jpg|sis|mmf|amr|thm|png|wbmp|rar|zip)$",$superdat_name)){

    print 
    "<b>Unsuported File extention!!!</b>";

    }else{

    $superdat_name preg_replace(

                 
    '/[^a-zA-Z0-9\.\$\%\'\`\-\php\@\{\}\~\!\#\(\)\&\_\^]/'

                 
    ,'',str_replace(array(' ','%20'),array('_','_'),$superdat_name));

    if(
    strlen($superdat_name)>53){ print "<b>File Name to long!!!</b>";

    }else{

    if (empty(
    $superdat)) {

    print 
    "<b>No input file specified!!!</b>";

    }else{

    if (
    file_exists("".$dir."/".$superdat.""))

                {

                echo 
    "File already exists";

                echo 
    "<br /><small><a href=\"upload.php\">Upload xhtml</a><br /></small>";

                      echo 
    "<br /><small><a href=\"index.php\">Uploads</a><br /></small>";

                      echo 
    "<small><b>Script by:</b>Tommie©</small><br/>";

                      print 
    "</p></body></html>";

                exit();

                }



    copy("$superdat""$dir/$superdat_name") or

    die(
    "Couldn't copy file.");







        
    $fsize=round($superdat_size/1024,1);

        
    $brws explode(" ",$_SERVER[HTTP_USER_AGENT] );

        
    $ubr $brws[0];

        
    $ip=getenv('REMOTE_ADDR');

        
    $rev strrev ($superdat_name);

        
    $exp explode ("."$rev);

        
    $true strrev ($exp[0]);

        
    $trueext strtolower ($true);

        
    $adds=mysql_query("INSERT INTO from ibwf_upload SET file='".$superdat_name."',name='".$name."',description='".$desc."',size='".$fsize."',filename='".$fname."',ftype='".$trueext."',dir='".$dir."',browser='".$ubr."',ip='".$ip."'");

        if (
    $adds) {



              echo 
    "added<br/>

                    File: 
    $superdat_name<br/>

                    File Name: 
    $fname<br/>

                    Name: 
    $name<br/>

                    Description: 
    $desc<br/>

                    File Size: 
    $fsize KB<br/>

                    File Type:*.
    $trueext<br/>";

             } else {



                  echo 
    "Please try again<br/>";

               }



    echo 
    "file has been successfully uploaded";

    }

    }

    }

    }

    ?>

    <form align="left" action="upload.php" method="post" ENCTYPE="multipart/form-data">

    Name:<br/><input type="text" name="name" size="30" /><br/>

    File Name:<br/><input type="text" name="fname" size="30" /><br/>

    Description:<br/><textarea name="desc" rows="3" cols="40"></textarea><br/>

    File: <br/><input type="file" name="superdat" size="30"/><br/>

    Catagory:<br/>

    <select name="dir" value="">

            <option value="mp3s">mp3s(<?=$c1[0]?>)</option>

            <option value="wallpapers">Wallpapers(<?=$c2[0]?>)</option>

            <option value="photos">Photos(<?=$c3[0]?>)</option>

            <option value="videos">Videos(<?=$c4[0]?>)</option>

            <option value="games">Games(<?=$c5[0]?>)</option>

            <option value="ringtones">Ringtones(<?=$c6[0]?>)</option>

            <option value="applications">Applications(<?=$c9[0]?>)</option>

            <option value="scripts">Scripts(<?=$c7[0]?>)</option>

            <option value="other">Other(<?=$c8[0]?>)</option>

            </select><br/>

    <input type="submit" value="Upload!"/>
    </form>
    </small>

    </b>
    <center><a href="index.php">BACK FILESHARE</a></center>

    <div class="foot">

    <center><small>&copy; MyChat 2007-2010</small></center>

    </div></body></html>
    Last edited by metulj; 26.05.09, 04:45.

    #2
    what exact error r u getting??
    LDSWAPWORLD sigpic
    site closed.
    im busy with other things in life like facebook , send me PM so i can add you
    www.pinoySG.com

    don't ask for help if you're not even helping yourself!
    i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


    Comment


      #3
      Originally posted by capofret View Post
      what exact error r u getting??
      any file upload its not work. but nothing error details appear.

      Comment


        #4
        <option value="mp3s">mp3s(<?=$c1[0]?>)</option>

        <option value="wallpapers">Wallpapers(<?=$c2[0]?>)</option>

        <option value="photos">Photos(<?=$c3[0]?>)</option>

        <option value="videos">Videos(<?=$c4[0]?>)</option>

        <option value="games">Games(<?=$c5[0]?>)</option>

        <option value="ringtones">Ringtones(<?=$c6[0]?>)</option>

        <option value="applications">Applications(<?=$c9[0]?>)</option>

        <option value="scripts">Scripts(<?=$c7[0]?>)</option>

        <option value="other">Other(<?=$c8[0]?>)</option>

        Now make them folders and chmond them 777
        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...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          Originally posted by subzero View Post
          <option value="mp3s">mp3s(<?=$c1[0]?>)</option>

          <option value="wallpapers">Wallpapers(<?=$c2[0]?>)</option>

          <option value="photos">Photos(<?=$c3[0]?>)</option>

          <option value="videos">Videos(<?=$c4[0]?>)</option>

          <option value="games">Games(<?=$c5[0]?>)</option>

          <option value="ringtones">Ringtones(<?=$c6[0]?>)</option>

          <option value="applications">Applications(<?=$c9[0]?>)</option>

          <option value="scripts">Scripts(<?=$c7[0]?>)</option>

          <option value="other">Other(<?=$c8[0]?>)</option>

          Now make them folders and chmond them 777

          what do you mean sir subzero? i already make folder. where can i find chmond?
          Last edited by mhazter; 24.05.09, 10:09.

          Comment


            #6
            he meant change the folder permission (perms) to 777
            LDSWAPWORLD sigpic
            site closed.
            im busy with other things in life like facebook , send me PM so i can add you
            www.pinoySG.com

            don't ask for help if you're not even helping yourself!
            i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


            Comment


              #7
              its not working.

              Comment


                #8
                u use a variable called superdat .. but i dont see it being defined anywhere ?

                oh and if you get nothing (blank page) then you should put
                Code:
                error_reporting(E_ALL);
                ini_set("display_errors", 1);
                at the top of the code to display any php errors in the code

                Comment

                Working...
                X