Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
UPLOAD FORM (file name ) READ THIS
Old 08-15-2010, 06:38 AM UPLOAD FORM (file name ) READ THIS
Novice Talker

Posts: 5
Name: arlind
Trades: 0
[b]Hi, I have in my website a upload form (people can upload music to my site) and others can download and listen.
How can I make to change the file name when they upload in my site.
EXAMPLE: if they upload this song:

shakira-waka-waka.mp3
I like to change name automatic to
mysite.com-shakira-waka-waka.mp3


please contact me to webhoost@live.com please please please
ask if you can not understeand something

Last edited by webmaster000; 08-15-2010 at 06:44 AM..
webmaster000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-15-2010, 06:44 AM Re: UPLOAD FORM (file name ) READ THIS
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Can't be done with HTML.

Maybe you could do it AS YOU CHECK FOR COPYRIGHTED MATERIAL!!!!!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-15-2010, 07:24 AM Re: UPLOAD FORM (file name ) READ THIS
Novice Talker

Posts: 5
Name: arlind
Trades: 0
i have php upload form form



INDEX.PHP
<form action="upload.php" method="post" enctype="multipart/form-data">
File: <input type="file" name="file" size="30"> <input type="submit" value="Upload">
</form>



UPLOAD.PHP


<?php
// ==============
// Configuration
// ==============
$uploaddir = "uploads/images"; // Where you want the files to upload to - Important: Make sure this folders permissions is 0777!
$allowed_ext = "jpg, JPG, jpeg, JPEG, gif, GIF, bmp, BMP, PNG, MP3"; // These are the allowed extensions of the files that are uploaded
$max_size = "1500000"; // 50000 is the same as 50kb
$max_height = "250"; // This is in pixels - Leave this field empty if you don't want to upload images
$max_width = "230"; // This is in pixels - Leave this field empty if you don't want to upload images
// Check Entension
$extension = pathinfo($_FILES['file']['name']);
$extension = $extension[extension];
$allowed_paths = explode(", ", $allowed_ext);
for($i = 0; $i < count($allowed_paths); $i++) {
if ($allowed_paths[$i] == "$extension") {
$ok = "1";
}
}
// Check File Size
if ($ok == "1") {
if($_FILES['file']['size'] > $max_size)
{
print "Nuk pranohen foto me madhsi mbi 1.5 MB!";
exit;
}
// Check Height & Width
if ($max_width && $max_height) {
list($width, $height, $type, $w) =
getimagesize($_FILES['file']['tmp_name']);
if($width > $max_width || $height > $max_height)
{
print "Rezulucioni i fotografise eshte teper i madh!";
exit;
}
}
// The Upload Part
if(is_uploaded_file($_FILES['file']['tmp_name']))
{
move_uploaded_file($_FILES['file']['tmp_name'],$uploaddir.'/'.$_FILES['file']['name']);
}
print "Fotografia juaj u dergua me sukses, ajo do te vendohet ne web faqe pasi tė aprovohet nga Administratoret !";
} else {
print "Ju mund te ngarkoni vetem foto: Jpg, gif, bmp, png, mp3!";
}
?>









I LIKE TO CHANGE THOSE THINGS

Last edited by webmaster000; 08-15-2010 at 08:29 AM..
webmaster000 is offline
Reply With Quote
View Public Profile
 
Old 08-15-2010, 03:52 PM Re: UPLOAD FORM (file name ) READ THIS
Novice Talker

Posts: 5
Name: arlind
Trades: 0
how can automatic change id3 tag in mp3

See http://www.webmaster-talk.com/php-fo...read-this.html

Last edited by chrishirst; 08-17-2010 at 04:58 PM..
webmaster000 is offline
Reply With Quote
View Public Profile
 
Old 08-15-2010, 05:58 PM Re: UPLOAD FORM (file name ) READ THIS
Experienced Talker

Posts: 34
Trades: 0
I did some programming in Microsoft technologies and am not familiar with PHP. But adding something to the file name should be very easy. You just add some string to the file name and that should be it.

Thanks.
__________________
World's leading
Please login or register to view this content. Registration is FREE
. All free now.


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
robert1971 is offline
Reply With Quote
View Public Profile
 
Old 08-16-2010, 04:01 AM MP3 Search engine
Novice Talker

Posts: 5
Name: arlind
Trades: 0
How Can I make a Search engine in my site wich will search Mp3 from 2 Mp3 site.
And how can i make when people download the Mp3 from my site to change Name automatically to mysite.com+name of Mp3.mp3
webmaster000 is offline
Reply With Quote
View Public Profile
 
Old 08-16-2010, 05:48 AM Re: MP3 Search engine
Super Talker

Posts: 139
Name: John Davis
Trades: 0
1. You have to make search request to both sites and parse search result then.
2. You have to use header: header("Content-Disposition: attachment; filename=$filename");
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Old 08-16-2010, 10:06 AM Re: MP3 Search engine
Super Talker

Posts: 139
Name: John Davis
Trades: 0
There are a number of parameters should be sent in the header. The set of parameters depends from your requirements.
So, if you'll describe your aim, then I'll show you right way.
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Reply     « Reply to UPLOAD FORM (file name ) READ THIS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.58484 seconds with 12 queries