php get link from atom feed

Updated: 26th May 2023
Tags: php

How to read rss or atom with php

Updated: 26th May 2023
Tags: php

How to post to facebook page using api with plain php

Updated: 26th April 2023
Tags: php facebook

crop center and resize image using cwebp respecting aspect ratio (php)

Updated: 30th March 2023
Tags: php cwebp

Convert php array to javascript array

Updated: 28th March 2023
Tags: php javascript

[Solved] file_put_contents(/bootstrap/cache/packages.php): failed to open stream: Permission denied

Updated: 17th February 2023
Tags: laravel php ubuntu

php echo (convert) date to RFC 3339

Updated: 3th February 2023
Tags: php
echo date(DATE_RFC3339);
//convert from other format
echo date(DATE_RFC3339, strtotime('2023-01-01 05:55:55'));

[Solved] PHP Fatal error: Allowed memory size bytes exhausted (tried to allocate 67108872 bytes) in Composer/DependencyResolver/RuleSet.php on line 83

Updated: 14th October 2022
Tags: php composer

Remove index.php from url nginx laravel

Updated: 8th June 2022
Tags: nginx php

My programming tips after 10 years of programming

Updated: 28th April 2022
Tags: php mysql

Redis vs Memcache for PHP

Updated: 24th March 2022
Tags: redis memcached php

Memcache. It allows you to store both strings and php arrays and have fun. If it is not enough, try redis.

PHP how to make work curl with CURLOPT_SSL_VERIFYHOST or fix php curl SSL certificate

Updated: 23th March 2022
Tags: php curl

Don't rely on isset to check if it is isset!

Updated: 15th June 2021
Tags: php

Php isset will tell false if variable is null.


$a[1] = null;

That's why you should use array_key_exists if you need to check if it is set or not.


$a[1] = null;

Laravel clear queue job code cache

Updated: 12th April 2021
Tags: php laravel

Laravel queue job is caching your job php code, so after updating job code you need to:

php artisan queue:restart

PHP server cmd command

Updated: 6th February 2020
Tags: php

PHP server in current directory

php -S localhost:8000

PHP server in public directory

php -S localhost:8000 -t public

PHP Simple PDO class

Updated: 23th December 2019
Tags: php mysql sql

Laravel select random row from table

Updated: 22th December 2019
Tags: php laravel sql

Get randow row from table in laravel 5.3+

$randomRow = DB::table('table')

Get randow id from table in laravel 5.3+

$randomId = DB::table('table')

Increase laravel performance

Updated: 20th December 2019
Tags: php laravel

Update laravel/installer global

Updated: 20th December 2019
Tags: php composer laravel

Laravel fresh install ubuntu HTTP 500 Fix

Updated: 18th December 2019
Tags: php laravel ubuntu

After installing laravel you MUST change some folder permissions.

sudo chmod 755 -R laravel_app
sudo chmod -R o+w laravel_app/storage
sudo chmod -R o+w laravel_app/bootstrap/cache