Curl and other network functions

Network access to outside websites is disabled, BUT there are still ways to test CURL or other functions that require network access. All network traffic on port 80 and port 443 (https) are redirected to a test server where you can request some test files or request response codes.

Sample files

There are a bunch of sample files available to play around with:
You can request them within this sandbox by calling ANY website like this:

To get books.xml request for example: or
To get people.csv: or

Click here for a demo!

And you can always upload your own file like this for example:
Keep in mind that the file will be deleted right after you script is done executing, so implement this step in your code.

Basic Authentication

Request any url ending with /auth to request a page with basic authentication. Username is user and password is password.

HTTPS Requests

Using the fopen wrappers you are able to request the sample files like usual, but using CURL you will need to add:
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); to be able to request the file.
See the demo for an example.

Request Status Codes

You can request a return of a status code by using "/error/[errorcode]".
Have fun!

Most used PHP functions

Last used PHP functions