Page 2 of 2 FirstFirst 12
Results 13 to 15 of 15

Thread: urgently required please how can i let my visitors to upload files directly

  1. #13
    kanch's Avatar
    kanch is offline Senior Member+
    Last Online
    3rd June 2012 @ 04:58 PM
    Join Date
    11 Jan 2009
    Age
    35
    Posts
    111
    Threads
    6
    Credits
    0
    Thanked: 1

    Default Hmm

    Quote sanishan said: View Post
    Asalam o alikum!

    Janam askfriends may sirf yeh kahna chahta hon kay agar app apni stie per uploading rakhain gay to yeh bahoot hi mushkil kaam hay... app apni site per koi chota sa script laga kay file upload kar saktain hain lakin... kuch hacker Shell ko jpg yah direct php asp may upload kar kay app ki site ko down kar saktain hain with in few sec. baar hal may app ko file uploading ka script day raha hon. is ki koi girecnty nahi hay.. kah yeh shell ko rook sakay....

    PHP Code:
    <?php header('Content-type: application/vnd.wap.xhtml+xml'); ?>
    <?php 
    echo '<?xml version="1.0"?' '>'?>
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>File Upload Example</title>
      </head>

      <body>
        <h1>Data Received at the Server</h1>
        <hr/>
        <p>

    <?php
    foreach ($_POST as $key => $value){
    ?>

    <b>Name-value Pair Info:</b><br/>
    Field name: <?php echo $key?><br/>
    Field value: <?php echo $value?><br/><br/>

    <?php
    }

    $optionalFileName $_POST['filename'];

    if (
    $_FILES['myFile']['error'] == UPLOAD_ERR_OK){
      
    $fileName $_FILES['myFile']['name'];
    ?>

    <b>Uploaded File Info:</b><br/>
    Content type: <?php echo $_FILES['myFile']['type']; ?><br/>
    Field name: myFile<br/>
    File name: <?php echo $fileName?><br/>
    File size: <?php echo $_FILES['myFile']['size']; ?><br/><br/>

    <?php
      
    /* Save the uploaded file if its size is greater than 0. */
      
    if ($_FILES['myFile']['size'] > 0){
        if (
    $optionalFileName == "")
          
    $fileName basename($fileName);
        else
          
    $fileName $optionalFileName;

        
    $dirName '/file_uploads/';    // <--- link to your Folder Jasay Images or other

        
    if (move_uploaded_file($_FILES['myFile']['tmp_name'], $dirName $fileName)){
    ?>

    <b>The uploaded file has been saved successfully.</b>

    <?php
        
    }
        else{
    ?>

    <b>An error occurred when we tried to save the uploaded file.</b>

    <?php
        
    }
      }
    }
    ?>

        </p>
      </body>
    </html>


    Yeh Kaam nahin karegy orr shayad aap Banned na ho jaen....

    if i think... Main apko uploading wali Script donga single.php k naam se jis main aap password protect and multi uplaod with change directory and create delete bhi kar sakty hain.. Mean File Managment Thanks..

  2. #14
    farooq_11's Avatar
    farooq_11 is offline Senior Member+
    Last Online
    13th February 2012 @ 10:39 PM
    Join Date
    23 Dec 2008
    Location
    in ur heart
    Age
    32
    Gender
    Male
    Posts
    212
    Threads
    21
    Credits
    935
    Thanked
    0

    Default

    salam
    kanch wo php script kya hai bata do

    www.seven86.******

  3. #15
    sbdpk is offline Senior Member+
    Last Online
    3rd August 2013 @ 10:53 AM
    Join Date
    31 Jan 2009
    Location
    Rawalpindi
    Age
    34
    Posts
    66
    Threads
    5
    Credits
    0
    Thanked
    3

    Default

    Quote askfriends said: View Post
    no iam using free server and i dont use any language to create web site or web pages i simply use WYSIWYG html editor softwares to create web page or u can view my web site www.askfriends.host.sk and then suggest me how to do that
    Create your site here to upload files php,my sql supported server
    Last edited by Sheeda_Pastol; 13th June 2009 at 01:17 AM. Reason: MFA/commercial site link removed

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Cloud Download Files Directly into Dropbox, G-Drive etc
    By Umar-Hayat in forum General Discussion
    Replies: 30
    Last Post: 26th October 2015, 03:48 PM
  2. Replies: 12
    Last Post: 6th December 2014, 07:24 AM
  3. Replies: 46
    Last Post: 3rd June 2010, 10:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •