Categories: Snippets

Receive JSON POST with PHP

$HTTP_RAW_POST_DATA

instead of

$_POST

It will give you POST data as is. You will be able to decode it using

json_decode()

later

Share

Recent Posts

Clear the browser cache of CSS or JavaScript Using PHP

Other than caching every hour, or every week, you may cache according to file data.…

5 years ago

Current Site URL – Codeigniter

To get host url of current server simply replace application\config\config.php [crayon-662cbd230b06c709700260/] with [crayon-662cbd230b073703254480/]  

5 years ago

PHP: fopen error handling

You should first test the existence of a file by file_exists(). [crayon-662cbd230b1cb369198425/] or simple solution…

5 years ago

Random String PHP

[crayon-662cbd230b314227528019/] Output the random string with the call below: [crayon-662cbd230b31a034622839/]  

5 years ago

PHP function to make slug (URL string)

Note: from WordPress Use it like this: [crayon-662cbd230b456816809534/] Code: [crayon-662cbd230b45d524397328/]  

5 years ago

Include all files with in the folder

[crayon-662cbd230b5c1458065696/]  

6 years ago