| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Closed Join Date: Oct 2005 Location: United Kingdom
Posts: 1,554
![]() ![]() ![]() ![]() | img upload script help i got this code from a namepors member that was posted last year or some thing but just help me out any way how do i change the code so it makes random names for file name the code is: PHP Code: |
| |
| | #4 (permalink) |
![]() Join Date: Jul 2005 Location: Coffs H, Australia
Posts: 3,456
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Well, the code is very outdated, and you might want to consider searching around for a newer one, but I fixed it up for you anyway. PHP Code:
__________________ Free Forums / GoDaddy Coupon Codes (NEW DOMAIN!) / Free Arcade Script / <?='Your computer is '.(1?fine:broken).'.'?> |
| |
| | #6 (permalink) |
| NamePros Regular Join Date: Aug 2004
Posts: 363
![]() | It might be a better idea to search google for a script that does it instead of changing an older script to do it. PJ
__________________ L33TSig.net |
| |
| | #7 (permalink) | ||||
![]() Join Date: Jul 2005 Location: Coffs H, Australia
Posts: 3,456
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Code: $ext=strtolower(ereg_replace("^.+\\.([^.]+)$", "\\1",$HTTP_POST_FILES['userfile']['name']));
$imagename=substr(md5(uniqid(rand())),0,15).".".$ext; The second line substr(md5(uniqid(rand())),0,15) creates a random number 15 characters in length and creates the 'imagename' variable, which is the random number with the extenstion added to it, giving you a new random file name e.g. 243543657245683.jpg ????: NamePros.com http://www.namepros.com/showthread.php?t=174816 Rhett.
__________________ Free Forums / GoDaddy Coupon Codes (NEW DOMAIN!) / Free Arcade Script / <?='Your computer is '.(1?fine:broken).'.'?> | ||||
| |
| | #9 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Umm yeah, this an old and outdated script, but: PHP Code: Note: anywhere it says mydomain.com, you need to change to your domain name.
Last edited by SecondVersion; 03-26-2006 at 03:53 PM.
|
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Great Scripts for Sale With Resale Rights! | Zeeble | Scripts For Sale | 20 | 01-04-2006 02:39 AM |
| Huge Xmas script pack sale $5.00 | KPR | Scripts For Sale | 1 | 12-08-2005 07:25 PM |
| 60.000 Templates, scripts, fonts, banners etc. $9.95 | atkims | Web Development Wanted | 19 | 11-16-2004 10:48 AM |