Results 1 to 3 of 3

Thread: Screenshot uploader?

  1. #1
    Join Date
    May 2008
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Screenshot uploader?

    I'm thinking of making a screenshot uploader, so that, every five seconds or so, it would upload a screenshot to my website (its bad, I know) http://saradamian13.freehostia.com\New.html somehow, it has to run in the background, because I will be running a bot whenever I run it. So if you guys had any snippets of code, that would help a lot. Thanks in advance!

  2. #2
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Can I take a look at your upload_file.php's source?

  3. #3
    Join Date
    May 2008
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sure, hold on, I will edit it later, (soon)

    Edit:
    PHP Code:
    <?php
      
    if ($_FILES["file"]["error"] > 0)
        {
        echo 
    "Return Code: " $_FILES["file"]["error"] . "<br />";
        }
      else
        {
        echo 
    "Upload: " $_FILES["file"]["name"] . "<br />";
        echo 
    "Type: " $_FILES["file"]["type"] . "<br />";
        echo 
    "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
        echo 
    "Temp file: " $_FILES["file"]["tmp_name"] . "<br />";
        if (
    file_exists("upload/" $_FILES["file"]["name"]))
          {
          echo 
    $_FILES["file"]["name"] . " already exists. ";
          }
        else
          {
          
    move_uploaded_file($_FILES["file"]["tmp_name"],
          
    "upload/" $_FILES["file"]["name"]);
          echo 
    "Stored in: " "upload/" $_FILES["file"]["name"];
          }
        }
    ?>
    Last edited by Starbridge; 04-28-2009 at 10:12 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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