Skip to content

Sending POST data without form

Can i send for example a string or another piece of information to another .php file without it being exposed [thus not by GET but by POST conform to what i know] without using a form? Answer If you don’t want your data to be seen by the user, use a PHP session. Data in a post request is still

PHP calculate age

I’m looking for a way to calculate the age of a person, given their DOB in the format dd/mm/yyyy. I was using the following function which worked fine for several months until some kind of glitch caused the while loop to never end and grind the entire site to a halt. Since there are almost 100,000 DOBs …

PHP – make session expire after X minutes

i am using the following technique… From the login.php the form posts to the page check.php where i do this and on loggedin.php page the first thing i do is but once logged in when i directly type the url localhostmyProjectloggedin.php it displays the page…which makes perfect sense because the ses…

php mkdir() chmod and permissions

i was using this basic script: i create this directory and then upload photos to it. I’ve been doing this for a good 4-5 months now and suddenly i start getting ‘FORBIDDEN’ errors when I attempt to view the contents of the folder via web browser The directory is being created the same and th…

PHP – Debugging Curl

I’d like to see what the post fields in the request are before I send it. (For debugging purposes). The PHP library (class) I am using is already made (not by me), so I am trying to understand it. As far as I can tell, it uses curl_setopt() to set different options like headers and such and then it uses

How do I debug a webhook POST?

A webhook is sending me a POST, and I want to do some debugging on it. Currently I’m looping over the array and then sending a mail() to myself instead of printing (because how could I see what’s …