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-68b5acee7d8d8321414471/] with [crayon-68b5acee7d8e2218781758/]  

7 years ago

PHP: fopen error handling

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

7 years ago

Random String PHP

[crayon-68b5acee7ddd5853481651/] Output the random string with the call below: [crayon-68b5acee7dddc505955269/]  

7 years ago

PHP function to make slug (URL string)

Note: from WordPress Use it like this: [crayon-68b5acee7ea3c762129736/] Code: [crayon-68b5acee7ea4b804267620/]  

7 years ago

Include all files with in the folder

[crayon-68b5acee8071b250513520/]  

7 years ago