| PHP Upload | |
|
|
Author | Message |
---|
Cory Averagely Active
Posts : 77 Join date : 2008-12-12 Age : 32
| Subject: PHP Upload Sun Jan 04, 2009 4:01 pm | |
| Ok, so I now own a site because I purchased a domain name from godaddy and they are giving me free hosting and I am trying to make a uploader for swfs, (kinda like trportfolio) and I have tooken many tutorials online but I just can get it to work. I need someone to help me code it. Uni was gonna help but no he isnt. PM me or post here if you are willing to help me please. | |
|
| |
Tonney -
Posts : 580 Join date : 2008-12-09 Age : 113 Location : tonney
| Subject: Re: PHP Upload Mon Jan 05, 2009 4:38 am | |
| | |
|
| |
Ghost -
Posts : 317 Join date : 2008-12-07 Age : 32 Location : Nottingham, England.
| Subject: Re: PHP Upload Mon Jan 05, 2009 12:09 pm | |
| Yea, cal is a good coder. He's better than me I think with php. | |
|
| |
cal Amazing poster
Posts : 155 Join date : 2008-12-15 Age : 115 Location : the land before time
| Subject: Re: PHP Upload Mon Jan 05, 2009 3:03 pm | |
| | |
|
| |
Zackie FR Lover
Posts : 342 Join date : 2008-12-21 Age : 31 Location : EARTH!!!
| Subject: Re: PHP Upload Tue Jan 06, 2009 3:48 am | |
| So what's gonna happen to this thread? | |
|
| |
Ghost -
Posts : 317 Join date : 2008-12-07 Age : 32 Location : Nottingham, England.
| Subject: Re: PHP Upload Tue Jan 06, 2009 12:07 pm | |
| It will stay unlocked for now, maybe in case Cal/Cory want to share the code. | |
|
| |
cal Amazing poster
Posts : 155 Join date : 2008-12-15 Age : 115 Location : the land before time
| Subject: Re: PHP Upload Wed Jan 07, 2009 11:27 am | |
| i dont know whats going on, he just sent me a link to his site, its just a login :? | |
|
| |
Ghost -
Posts : 317 Join date : 2008-12-07 Age : 32 Location : Nottingham, England.
| Subject: Re: PHP Upload Wed Jan 07, 2009 11:32 am | |
| He wants you to creat a php script that will allow visitors to his site to upload swf files.
I think he has attempted to make some start on it, so I would suggest asking him what he has done so far, and exactly what he wants. (Just a script, the pages as well, what functions this uploader/script needs to do etc) | |
|
| |
cal Amazing poster
Posts : 155 Join date : 2008-12-15 Age : 115 Location : the land before time
| Subject: Re: PHP Upload Thu Jan 08, 2009 12:51 pm | |
| - Code:
-
<?php $ftypes = array("image/jpeg", "image/gif"); //add more to alow more types $maxsize = 5242880; // this is 5 mb, in bytes, use google to convert if($_POST['submit']){ if(in_array($_FILES["file"]["type"], $ftypes) && $_FILES["file"]["size"] < $maxsize){ move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"]); echo "Link 2 fiel: " . "<a href='upload/" . $_FILES["file"]["name"] . "'>Click heor</a>"; }else{echo "Invalid file type."; } }else{ ?> <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data"> <input type="file" name="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form> <?php } ?>
incredibly simple, put that script in a php file, then create a directory called uploads. i could make a more complicated one, or modify it to suit or whatever, just ask. | |
|
| |
Sponsored content
| Subject: Re: PHP Upload | |
| |
|
| |
| PHP Upload | |
|