Honestly, unless you’re dealing with legacy code, avoid this mess. Redesign the endpoint to use POST body or GET params, not both.
But if you’re stuck, `parse_str(file_get_contents('php://input'), $postData)` might help fish out params.
---
OP Reply:
Wow, thanks for all the replies! Didn’t expect so many ideas.
Tried the `$_SERVER['QUERY_STRING']` trick and it kinda worked—found some stray GET params hiding there. Still feels janky though.
Might just refactor the endpoint like a few of you suggested. Appreciate the sanity check!
Quick follow-up: anyone know if this "CURL GET info from POST request" hack breaks with HTTPS or custom headers? Just wanna cover my bases.
Cheers!
But if you’re stuck, `parse_str(file_get_contents('php://input'), $postData)` might help fish out params.
---
OP Reply:
Wow, thanks for all the replies! Didn’t expect so many ideas.
Tried the `$_SERVER['QUERY_STRING']` trick and it kinda worked—found some stray GET params hiding there. Still feels janky though.
Might just refactor the endpoint like a few of you suggested. Appreciate the sanity check!
Quick follow-up: anyone know if this "CURL GET info from POST request" hack breaks with HTTPS or custom headers? Just wanna cover my bases.
Cheers!
