DB
Search by
Email
Github
Twitter
Blog Archive
October 3, 2021
1 minute
Detect suspicious logins on Laravel sites
Laravel Suspicious Logins is a free package to automatically track logins to your site, and detects if a login is suspicious. You can then email either the owner of the account or yourself to notify of the suspicious login.
Read full story ->
July 13, 2021
1 minute
Use range() in PHP for loops
Using the range() function makes your for loops in PHP far cleaner to read and easier to maintain by switching to a foreach.
Read full story ->
July 13, 2021
1 minute
Goodbye strpos and strstr: str_contains in PHP8
The frustration of having to use strpos and strstr to check if strings contain another string is over with PHP 8 and a great new string function called str_contains.
Read full story ->
June 30, 2021
1 minute
Solve blurry scaled images in Chrome
A very annoying new feature in Chrome in the last couple of months is that CSS scaled images are blurry when loaded. You can fix this by adding this style tag to your images.
Read full story ->
June 7, 2021
1 minute
Set a custom user agent with Laravel's Http Client
You can customize the user agent that Laravel sends with the withUserAgent call. It can often happen that a WAF or other security system will block curl, PHP and Guzzle based requests.
Read full story ->
June 1, 2021
3 minutes
Checking a remote hosts SSL expiry date with PHP
This simple function will return the number of days remaining on an SSL certificate, including potentially negative values if it's expired.
Read full story ->
← Newer Posts
Older Posts →