Skip to content

Send mail in phpmailer using DKIM Keys

Currents i am using phpmailer to send mail’s. now how its possible to send email in phpmailer with DKIM keys i search in phpmailer Class file and i found the below code Can i know how its possible. Answer If you take a look in the PHPMailer unit tests, there is an example of how to set up DKIM. Here

PHP Overriding methods rules

I just read from the book: “In PHP 5, except for constructors, any derived class must use the same signature when overriding a method” From the PHP manual in the comments: “In the overriding, the method names and arguments (arg’s) must be same. Example: class P { public function getName(){} …

PHP – hide url (GET) parameters

I have a link in my PHP/HTML like this: When users click on the link, the parameters are handled by a 3rd party website which log the users in seamlessly. Is it possible to hide/mask/camouflage the url so that users don’t see the parameters while still passing them over to the designated site? If no, ho…

Laravel Form Validation, fail if not empty

I have an input field which needs to be empty, otherwise I want the validation to fail. This is an attempt at stopping spam through a contact form. I’ve looked at the documentation for the validation but there’s nothing to do this, other than the “max” rule, but this doesn’t work…

php strtotime in seconds and minutes

i use ths method to find the difference between two timestamp and get the number of seconds between those two times, and i refresh the information with jquery like a counter. When the difference is more than 60 seconds, the $time comes back to 0, like a reset. i would like to display 1 min XX s for example An…

Get number of days for previous month

I’m using this code to get number of days in last month, but if the current month is January (01) it’s going to use 00 month instead of 12. $prev_month_days = cal_days_in_month(CAL_GREGORIAN, date(‘m’…

Symfony Console tab completion

I have an application with a Symfony Console based CLI. The application does not use the Symfony framework, just the Symfony Console component. When I execute I get the usual overview with the name, version, options and registered commands shown. Suppose I just have one command, called “displaykittens&#…