Sending an email with PHP is pretty straight forwards. It's very useful for emailing reports generated from cron jobs etc. Sometimes though you need your application to email an attachment. After a load of messing around I have hacked together this email attachment PHP function. PLAIN TEXT PHP: function email_attachment($to_email, $email, $subject,$our_email_name, $our_email, $file_location, $default_filetype='application/zip'){ [...]
Archive:
Archive for June, 2008
Check out this simple and easy function for extracting the name from an email address. It's not very advanced but it is quite handy. Of course it could be used for similar applications by simply changing the character to split on. PLAIN TEXT PHP: function email_name($email_address, $split='@'){ return ucwords(strtolower(substr($email_address, 0, strripos($email_address, $split)))); } [...]
It seems that there are many UK webmasters who struggle to find a reliable UK based web developer who specialises in PHP. I have heard stories of people who claim to be osCommerce experts but in reality they simply know how to install a few contributions and that's about it. If you are looking for [...]
Sometimes you want your script to pause for a short period of time before repeating a loop or proceeding to the next step. This may be to reduce server load or even to simulate the natural pauses that a person would make whilst browsing a site. This kind of thing is especially true if you [...]