Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Save File

  1. #1
    Banned
    Join Date
    Nov 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save File

    The following code, reduces an MP3 file length to x seconds. How do I save this music file as a new mp3 file?

    Code:
    $f = fopen("Upload/".$row['Path'], "rb");
    $trash = fread($f, 2488320);
    echo fread($f, 245760);
    $trash = null ;
    fclose($f);

  • #2
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,519
    Thanks
    114
    Thanked 110 Times in 109 Posts
    Get a good mp3 class. I can't imagine just truncating the file it a great idea. See my attachment. This ones cool because you can even layer mp3s over the top of each other.
    Attached Files Attached Files
    You can not say you know how to do something, until you can teach it to someone else.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •