Example 1 Using file_get_contents() file_get_contents() method is a built-in PHP function and it returns the file content into a string format. Now to get raw data of the form you can give the input to the file_get_contents as php://input. Using getContent() method. Using all() method on Request class. Using get() method. Aug 30, 2022