Category Archives: PHP

google.com: XXX.XXX.XXX.XXX is neither permitted nor denied by best guess record for domain of [email protected]

If you are using mail() to send an email, with PHP, and you are getting the following error…

spf=neutral (google.com: 69.55.XXX.XXX is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Return-Path: <[email protected]>

You can force the ‘mailfrom’ by adding -f[email protected], after the headers.

$send = mail($to, $subject, $message, implode("\r\n", $headers), '-f'.$from);

codeigniter + php + mysql – emojis 😉

This is how…

On mysql set your table(s)’s filed(s) to utf8mb4_general_ci.

codeigniter config/database.php
$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_general_ci';
Resources

https://stackoverflow.com/questions/10957238/incorrect-string-value-when-trying-to-insert-utf-8-into-mysql-via-jdbc

https://stackoverflow.com/questions/16828197/displaying-utf8-character-on-codeigniter