[PHP] Help invoking a regexp

2002-07-25 Thread Nicklas af Ekenstam
Hi I have this regular expression: (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|www\.[-a-z0-9.]+)[^ .,;\t<">\):] Which is supposed to match hyperlinks. I would like to use this from php to grab all hyperlinks in a text file and return them in an array. I've messed around with the function

[PHP] Reg exp to remove line feeds before lines starting with white space

2002-07-25 Thread Nicklas af Ekenstam
Hi I'm trying to do some parsing of mail headers and since not all headers follow the pattern: X-Header-A: A string X-Header-B: Another string that is longer X-Header-C: And this string is very very long compared But may very well look like this: X-Header-A: A string X-Header-B: Another string

[PHP] Grab value of mail headers

2002-07-24 Thread Nicklas af Ekenstam
Hi Could someone please enlighten me on a good way to grab the value for a given mail header once I've fetched the entire headers to a string using php:s imap_fetchheader() function? For an example I would like to look for a header called List-Id which may look like this: List-Id: And grab th

[PHP] Propably easy regex question

2001-07-24 Thread Nicklas af Ekenstam
Hi Could anyone help me with a code snippet that would take a string and add '> ' to it at the start of every new line just as a mail client does when replying to a mail? I.e. I would like this: Hello, How are you? To look like this: > Hello, > > How are you? When it's do

Re: [PHP] mailing in batches

2001-07-24 Thread Nicklas af Ekenstam
So sprach »Justin Farnsworth« am 2001-07-24 um 04:52:57 -0400 : > > Handling all those bounces manually will be a mess. > > From: Don Read <[EMAIL PROTECTED]>: > No matter which MTA you use. I'd have to disagree slightly here. Using qmail as your MTA would bless you with the VERP (Variable Env

Re: [PHP] Fetching binaires from an e-mail

2001-07-10 Thread Nicklas af Ekenstam
Nicklas af Ekenstam wrote: > Hi > > I'm currently trying to rewrite one of my old perl applications to php > and everything works great except one thing: > I can't figure out how to write a piece of code that will fetch and > unencode all binaires, if any, from

[PHP] Fetching binaires from an e-mail

2001-06-26 Thread Nicklas af Ekenstam
Hi I'm currently trying to rewrite one of my old perl applications to php and everything works great except one thing: I can't figure out how to write a piece of code that will fetch and unencode all binaires, if any, from an e-mail message in an imap stream and return them so that I can save the

[PHP] Finding every even 100

2001-03-21 Thread Nicklas af Ekenstam
Hi Propably a really simple question, but my math skills are not up to speed anymore: How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc. I could always divide by 100 and have a look at the result and se if it has any decimals but I'm guessing this could be done prettier

[PHP] Unix-time problem

2001-03-04 Thread Nicklas af Ekenstam
Hi! I wrote this simple function to return the current date minus supplied number of years: function get_birthdate($age_in_years) { // get the current timestamp into an array $timestamp = time(); $date_time_array = getdate($timestamp); $hours = $dat

[PHP] Php and forking

2001-01-31 Thread Nicklas af Ekenstam
Hi! Is there some way (perhaps using a multi threaded httpd?) that I can get php to fork processes? I.e. I'd like to have a script which prints something to the clients web browser and terminates that http connection, but keeps going in the background doing other processing not related to the

[PHP] Richard Heyes HTML Mime Mail class

2001-01-30 Thread Nicklas af Ekenstam
to do it myself. Does anyone here have any sample code or tips? Would be greatly appreciated. Thank! - Nicklas af Ekenstam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list adminis

[PHP] Sorting an array

2001-01-18 Thread Nicklas af Ekenstam
Hi! I have an array that looks kinda like this: NAMEADDRESS John DoeSome Street 1 Jane DoeAnother Street 2 Bill Gates Helsinki 666 How do I sort this array based on NAME? ADDRESS? Thanks!! - Nicklas -- PHP General Mailing List (http://www.php.net/) To unsub