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.…

7 years ago

Current Site URL – Codeigniter

To get host url of current server simply replace application\config\config.php [crayon-6928590768e6e951301941/] with [crayon-6928590768e74079860544/]  

7 years ago

PHP: fopen error handling

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

7 years ago

Random String PHP

[crayon-6928590769161423266547/] Output the random string with the call below: [crayon-6928590769167475216377/]  

7 years ago

PHP function to make slug (URL string)

Note: from WordPress Use it like this: [crayon-6928590769249066050522/] Code: [crayon-692859076924c256018443/]  

7 years ago

Include all files with in the folder

[crayon-692859076930b129645793/]  

7 years ago