turn text file to string php 1

turn text file to string php

file_get_contents('http://url/to/upload/handler', false, $context);

Here is what the above code is Doing:
1. Create a new cURL resource
2. Set the URL of the file to upload
3. Set the HTTP method to POST
4. Set the POST fields
5. Set the content type to multipart/form-data
6. Set the file to upload
7. Execute the request
8. Close the cURL resource

Similar Posts