Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

thepip3r's Achievements


Member (2/5)



  1. well it sounds like it has become more of a sendmail question then since popen just executes a command on the host OS. if you find it though, i'd be curious to see it.
  2. ah even better... i was thinking about using it to create an entirely new indexed array and then using a for() loop to loop through... tyvm for the clarification.
  3. so array_slice() into a new array and count off of it's values correct? Ty wildteen.
  4. right... but this *hack* allows you to specify the FROM value in the PHP mail() function. Isn't that what you're looking to do? ...get a copy of the email as well as though it appears from the original sender? If so, just use this hack and the mail() function to shoot an email to you when you write all of the pertinent values to the database.
  5. I'm probably just rusty and can't recall but is there a way to mathematically get the last 20 values of a dynamically sized associative array? I realize I can remap the array with numeric indexes and then use that, I just wanted to make sure I'm not missing the easier (more efficient) way.
  6. i have *not* tested this but try this solution: http://www.cyberciti.biz/faq/howto-change-from-email-address-php-mail-function/ it seems to answer exactly what you're looking to do.
  7. yeah i knew i could add the values to another array -- just thought i remembered a sort that would do this for me. thanx mikesta
  8. i have a script reading a CSV file into an array. sometimes (based on the software version generating the CSV), there are blank cells which result in blank array elements which make the processing off. i've tried to remove those blank elements using unset() which does work but it doesn't reorder the array: so where i'm expecting $array[20], in the CSV with blank entries, the value i'm looking for is at $array[21] with $array[20] being blank. using unset, i've been able to wipe out this blank entry but my question is this: is there an inherent SORT or other function that will reorder the array as well based off of the keys? i've looked at ksort() etc but they all seem to maintain index association. i am fine for creating my own, i'd just rather use the PHP version if there is one. TIA! Edit: let me try to make this a bit more clear: so in my ideal form, the array looks similar to: [20] => Monday - November 16, 2009 [21] => 11/16/2009 12:00 [22] => 3 my problem array looks like: [20] => Monday - November 16, 2009 [22] => 11/16/2009 12:00 [23] => 3 this most recent set is of data is after the unset of the blank field was done on [21]. with this last array, is there a sort function i can pass so that it will reorder the keys so they are in order again with [22] with the date then becomes [21] and so on... does that clear it up?
  9. that's 100% right... it is a tar.gz file. is there a way i can do this?? just point me to the libs?? i appreciate the help printf
  10. It sounds like there might be an error occurring but you can't see it because of the error reporting configured in the PHP.ini file.
  11. PHP 5.3.1 Windows 2003/IIS 6 MySQL ?? I'm building a page that will import some information into a database that is programatically generated so I don't have any control over how the archives are presented. Basically, I'm trying to use the Zlib reading functions in order to parse these files and archives that contain more files to extract data I need and write it to a database. The problem is that because there are nested archives within the parent archive, when I've tried to parse that parent file with gzfile() or gzdecode(), it starts opening the text files underneath, but once it hits the other gz files, it shows garbled/encoded information. I know it's not much but this is what I've tried so far: <?php include("func.php"); ?> <html> <body> <pre> <?php $target = "tmp_dbg/"; $target = $target . basename( $_FILES['debug']['name']) ; $ok=1; if(move_uploaded_file($_FILES['debug']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['debug']['name']). " has been uploaded<br />"; } else { echo "Sorry, there was a problem uploading your file."; } $file_name = $target; $lines = gzfile($file_name); //$lines = gzdecode($lines); //print_r($lines); foreach ($lines as $line) { echo $line; } ?> </pre> </form> </body> </html> Can anyone offer any guidance on how I would recursively parse a parent GZ file and read all files (including embedded GZ files and their associated content) so I can start parsing this data? TIA!
  12. Rajiv, and that's why your title is "whizzkid" -- thanx a lot. worked like a champ.
  • 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.