Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
Linek98 is on a distinguished road
 
Posts: 4
Join Date: Oct 2008
Default File upload by users - 12-15-2008, 01:49 PM

Is it possible to make users able to upload a file without buying premmium site?

I mean script something like gallery but I cannot upload ANY file on my site... I'm using this script:


PHP Code:
  $uploaded "/home/a9945382/public_html/" $_FILES['plik']['name'];
  if (
is_uploaded_file($_FILES['plik']['tmp_name'])) {
    if (
$_FILES['plik']['size'] > 1024*1024*1024) {
      echo 
'Plik jest za duży';
    } else {
      
move_uploaded_file($_FILES['plik']['tmp_name'],$uploaded);
      echo 
"Operacja przebiegła pomyślnie";
    }
  } else {
    echo 
'Błąd przy przesyłaniu danych!';
  } 
what's wrong with this script >.<

So, is it possible to make such a script without buying premium site?
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
onegenius's Avatar
Senior Member
onegenius is on a distinguished road
 
Posts: 190
Join Date: Apr 2008
Send a message via AIM to onegenius
Default here - 12-17-2008, 01:51 AM

change
PHP Code:
$uploaded "/home/a9945382/public_html/" $_FILES['plik']['name']; 
to
PHP Code:
$uploaded "/folder/" $_FILES['plik']['name']; 
What you do then is create a folder name "folder" and go to cPanel and change its permission to "rw-rw-rw" (tick all the checkboxes) using "Another File Management" tool.

NB. "folder" can have any name.
Remember to change to folder's permission so you can write to it.
For security reasons you may want to ristrict certain files to upload.
Reply With Quote
(#3 (permalink))
Old
Member
fireworking is on a distinguished road
 
Posts: 83
Join Date: Dec 2008
Default 12-23-2008, 09:22 PM

The thing is.

You did not set a file type restriction. I could easily upload an exe virus and DDoS and 000webhost easily.

(Not that I know how to make an exe file) Well... (I do know how to make a php file to grab your file content)

Then, the bad guy could easily get into your files.


Get traffic really easily
This is no scam. I have gotten 8,000 unique visitors in the last month with this.
(Get 100 free points when you get 100 points)
Reply With Quote
(#4 (permalink))
Old
sizzlefire's Avatar
Administrator
sizzlefire is on a distinguished road
 
Posts: 4,531
Join Date: Apr 2008
Send a message via AIM to sizzlefire Send a message via MSN to sizzlefire Send a message via Yahoo to sizzlefire Send a message via Skype™ to sizzlefire
Default 12-25-2008, 12:42 AM

In order to have a file sharing script, it requires paid hosting
5. Chat, proxy, or file download scripts are not allowed. (allowed if you upgrade account)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com