A simple PHP script that Converts GET requests to POST and forwards data accordingly.
This PHP script takes query parameters from a GET request, constructs a form with those parameters, and then automatically submits the POST request to the specified URL. This script can be particularly useful when it's necessary to convert a GET request into a POST request on-the-fly.
To use the Get2Post script:
-
Place the
get2post.phpfile on your web server. -
Construct a GET request to the
get2post.phpURL, including aurlquery parameter that indicates the destination URL for the POST request along with any other query parameters you wish to forward.
// Example GET request format
https://your-domain.com/get2post.php?url=https://destination-domain.com/receive_post.php¶m1=value1¶m2=value2- When the GET request is made to the get2post.php, the script will automatically create a form and submit a POST request to https://destination-domain.com/receive_post.php with param1 and param2 included in the POST data.
Contributions are welcome! Feel free to submit pull requests or open issues to suggest improvements or report bugs.
This script has no error handling by design and should only be used in controlled environments. Always validate and sanitize incoming data when using it in production scenarios.
This project is licensed under Apache License, Version 2.0.
Nova Upinel Chow
Email: dev@upinel.com
If you wish to donate us, please donate to https://paypal.me/Upinel, it will be really lovely.