Jump to content

amites

Members
  • Posts

    248
  • Joined

  • Last visited

    Never

Posts posted by amites

  1. has anyone here done this?

     

    I have setup a program to validate that a user has access to a given mp3 file, from there they have the options of downloading it or listening to it through a flash player.

     

    The download part works well using:

    <?php
    header("Cache-Control: public, must-revalidate");
    header("Pragma: hack"); // WTF? oh well, it works...
    header("Content-Type: " . $mm_type);
    header("Content-Length: " .(string)(filesize($file_path)) );
    header('Content-Disposition: attachment; filename="'.$file_name.'"');
    header("Content-Transfer-Encoding: binary\n");
    
    readfile($file_path);
    
    ?>

     

    however I have had one hell of a time getting it to load into a mp3 player, I figure it has something to do with the "Content-Transfer-Encoding" though I'm honestly in a bit over my head at this point.

     

    any thoughts / advice / help / examples / etc...

     

    thank you

  2. Looking for someone who is well versed in Code Igniter, have a project that I started that has grown far beyond my capability to keep up with as a lone programmer. I have someone lined up to handle most of the front end. Looking for speed and accuracy to get a niche webapp launched.

     

    This project will have some longterm upgrade and maintenance work involved with it as well. Please include any relevant references to CI work you have completed, if you are familiar with Data Mapper and/or  Object Relational Mapping that would be ideal.

     

    Please respond via private message, I look forward to working with you

  3. Hello,

     

    I'm having trouble getting a form to submit multiple files, they are named differently and I'm rather certain I'm missing an obvious setting or something. Been looking at it so long I'm not seeing it.

     

    any help is greatly appreciated

     

    <form action="http://localhost/Heritage Web Design/Erik Ohanessian/draft/admin/media/upload.html" method="post" enctype="multipart/form-data"> 
    <div><span>Recording Name:</span>  <input name="name" type="text" value="" /></div><br /> 
    <div><span>Streaming MP3 File:</span>  <input name="mp3" type="file" /></div> 
    <div><span>Public sample?</span>  
      <input name="sample" type="checkbox" value="1" ></div><br /> 
    <div><span>High Quality (Downloadable) MP3 File:</span>  <input name="mp3_hq" type="file" /></div><br /> 
    <div><span>Workshop Document:</span>  <input name="document" type="file" /></div><br /> 
    <div><span>Recording active and available?</span>  
      <select name="status"> 
      <option value="1"  selected="selected">Yes</option> 
      <option value="0" >No</option> 
    </select> 
    <div align="center"><input name="Submit" type="submit" value="Submit"></div> 
    </form> 

     

  4. get yourself a copy of Firefox get the addons Firebug and Tamper Data, verify that the information you are sending to your script is what you think it is, and track down where your bug is coming from,

     

    from the sounds of it you are either running into trouble with processing an array or the Javascript

  5. Hello,

     

    I'm running into a strange one, I have a form item that looks like:

     

    <input type="text" name="property_taxes_monthly_expenses[]" id="property_taxes_monthly_expenses" class="expense expenses money form_fields" tabindex="1" value="" style="width: 120px;"/>

     

    generated by:

        <td> $ <input type="text" style="width: 120px;"
                value="<?php if(isset($_POST['property_taxes_monthly_expenses[]'])) echo $_POST['property_taxes_monthly_expenses[]']; ?>"
                tabindex="1" class="expense expenses money form_fields"
                id="property_taxes_monthly_expenses<?php if($num > 0) echo $num;?>"
                name="property_taxes_monthly_expenses[]"/></td>
    

     

    the bug:

    the value placed into this form field is not being accepted, I've gone so far as to submit the value manually through a firefox extension, nada

    this form has over 100 fields and this is 1 of 2 that don't hold their value when I print_r($_POST)

     

    this is being built inside the code igniter framework though I have checked the $_POST var before anything is initiated and it comes back blank every time, if I rename the vars it works some of the time, setup the same way as 16 other array vars and I'm stumped

     

    any ideas?

  6. Hello,

     

    This one is stumping my blain, hoping I can draw upon some help here,

     

    I am building an application that will allow users to preview an mp3 file in a flash player,

    question is, can this be done without using

        header(location: URL)

     

    I'd like to hide the mp3's outside of the public_html folder, don't have to but I would like to

     

    any ideas?

     

    I'm building this using the Code Igniter framework if that makes a difference to anyone's thought process

     

     

  7. Hello,

     

    I am attempting to build a function to add multiple arrays to a class var, I am attemting to do this from within an extension of that same class,

     

    the following is Code Igniter code with comments, it sets $this->_form_data properly trick is that it is loaded into a seperate object

    
    class MultiValid extends CI_Form_validation {
        function multi_rules($group = '') {
    
    // Loads the array
            $this->CI->config->load('form_validation', TRUE);
            $rules = $this->CI->config->item('form_validation');
            
            $set = false;
            if (is_array($group)) {
                foreach ($group as $grp) {
                    
                    if ($grp != '' && isset($rules[$grp])) {
                        
                        $this->set_rules($rules[$grp]);
                        $set = true;
                    }
                }
            }
            
            return $set;
        }
    }
    

     

    This code is loaded as $this->multidataa

    which fills $this->multidata->_form_data with values

     

    what I'd like to set is $this->form_validation->_form_data

    as it is a native library to CI and referenced regularly through other classes

     

    any ideas?

  8. Hello,

     

    I'm working on a script to auto parse URL's in text, I have the URL match working,

    unfortunately it is parsing existing links and image links as well, anyone have some advice?

     

    preg_match('/\\bhttps?:\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/i', $content)

     

    I tried adding (!=") and it simply ignores the last character of the match, what I want it to do id ignore matches inside quotation marks "

     

    any ideas are greatly appreciated

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.