Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ruler501

Pages: 1 ... 17 18 [19] 20 21 ... 184
271
Web Programming and Design / Re: PHP Upload
« on: November 26, 2012, 10:10:16 pm »
yeah I'll add some stuff to the upload page to make it a little prettier, and stevon8ter I hate to ask but could you add it so that they can upload a .txt document that goes in the same folder as the video?

272
News / Re: TI-84 Plus C: new photos reveal more than 3MB archive space
« on: November 25, 2012, 10:55:20 pm »
We can hope...
I would probably get this if I had money and it had reasonable hardware

273
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 08:48:07 pm »
Oh. The server just rebooted and is now installing updates so it may or may not work at any moment for the next 30 min.

274
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 08:40:25 pm »
I'd ask stevon8ter about that I'm not gonna touch the script now that its working.

EDIT: The server is installing updates. When its done everything should be working

275
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 08:13:54 pm »
I forgot to change a seetting I'll fix it in a little bit.

276
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 07:58:16 pm »
Rhombicuboctahedron your file went through. What kind of file were you trying to upload epic7? Though you should probably ask stevon8ter since he set it up

277
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:48:37 pm »
I'm still getting a completely blank page. Could it be something on my server set up wrong? This http://test.ruler501git.tk/omni/phptest.php page works so it seems not to be a problem with php. What else could cause it to show a completely blank screen?

278
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:34:01 pm »
I saved it as a uploader.php with exactly what I posted earlier. When I execute php5 uploader.php from the command line it runs and tells the index is invalid and that its an invalid file

279
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:27:58 pm »

280
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:24:41 pm »
yes I have html file upload.html with the form and then uploader.php with the php code

281
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:19:38 pm »
When I use this I'm not getting anything as output. I get a blank page when trying to upload an avi file

Code: [Select]
<?php

$allowedExts 
= array(&#39;mp4&#39;,&#39;wmv&#39;,&#39;avi&#39;,&#39;flv&#39;/*all allowed exts go here*/);
$extension end(explode("."$_FILES["file"]["name"]));
if ((
$_FILES["file"]["size"] < 10485760 /* file size*/) && in_array($extension$allowedExts))
  {
  if (
$_FILES["file"]["error"] > 0)
    {
    echo 
"Return Code: " $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    
$random_digit=rand(0000,9999);
    
$pathnew $random_digit $_FILES["file"]["name"];
    echo 
"Uploaded file name: " $pathnew "<br />";
    echo 
"Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";

$path=random_digit;

    if (
file_exists("/home/omni/uploads" $path "/" $pathnew))
      {
             
$lol 0;
while (
$lol === 0)
{
      
$random_digit=rand(0000,9999);
    
$pathnew $random_digit $_FILES["file"]["name"];

$path $random_digit;

if (
file_exists("/home/omni/uploads" $path "/" $pathnew))
{
$lol 0;
}
else
{
$lol 1;
}
}
      }
    else
      {
     
mkdir($path);

move_uploaded_file($_FILES["file"]["tmp_name"],
      
"/home/omni/uploads" $path "/" $pathnew);
       }
    }
  }
else
  {
  echo 
"Invalid file";
  }
?>
Did I do something wrong?

282
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 03:08:33 pm »
Yeah create a folder and put the video and text in it. I don't really care what the folders are named as long as they are all unique names

283
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 03:05:23 pm »
Do you mean make folders on your website or do you mean make a folder on the server
Create a folder on the server to store the video and text file in.
And what do you mean with textfiles?
That you upload a video + textfile and that they have to be linked together?
Yeah I was thinking they'd both go in a folder together inside of the uploads directory

284
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 02:49:19 pm »
Anything you can do to help would be great. I plan on learning just have never had the time. The only real thing we need is a way for videos to be uploaded and linked with a text file. Then for admins to be able to look at that. I was planning on using ftp for the admins and maybe folders to store the video and text together if I can find a way to make folders and upload files to them.

285
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 02:01:35 pm »
Rhombicuboctahedron I know how to get text. I'd probably just ask for a description txt file uploaded alongside. The hard part is linking them together for the admins, though I have ideas on how to do that. Once I get file upload working I'll work on that.

stevon8ter that would be great if you could post that. I am a complete php/web programming noob.

Pages: 1 ... 17 18 [19] 20 21 ... 184