Cookies help us deliver our better services. By using our site, you agree to our use of cookies.

Detecting CSV delimiter with PHP

Excel doesn't do a very good job on exporting comma separated files (CSV or TXT). Reading the file with fgetcsv could fail, since the field separator might not be as expected (a comma).

Here is a quick method to find the field delimiter from a CSV file. We'l ...

Speed up PHP mail() with sendmail's background delivery

By default, php mail() is using sendmail, using a 3 steps process:

  • mail() forks sendmail process
  • sendmail attempts to send message to destination server
  • sendmail returns to mail() when the message is sent

On a large batch of emails, you'll want to r ...