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

6 years ago

Current Site URL – Codeigniter

To get host url of current server simply replace application\config\config.php [crayon-679fd4f973f87272141433/] with [crayon-679fd4f973f8a287958396/]  

6 years ago

PHP: fopen error handling

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

6 years ago

Random String PHP

[crayon-679fd4f974105701508888/] Output the random string with the call below: [crayon-679fd4f974107739732535/]  

6 years ago

PHP function to make slug (URL string)

Note: from WordPress Use it like this: [crayon-679fd4f974190681025281/] Code: [crayon-679fd4f974192644194785/]  

6 years ago

Include all files with in the folder

[crayon-679fd4f974272020057634/]  

6 years ago