3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'triathlon.evenementsapq.ca/espresso-api/v1/authenticate?username=evenements&password=!Poumon123'; $data = array('key1' => 'value1', 'key2' => 'value2'); // use key 'http' even if you send the request to https://... $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', ), ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); var_dump($result);
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: file_get_contents(triathlon.evenementsapq.ca/espresso-api/v1/authenticate?username=evenements&password=!Poumon123): failed to open stream: No such file or directory in /in/leLsu on line 13 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Warning: No such file or directory in /in/leLsu on line 13 bool(false)
Output for 4.3.0 - 4.4.9
Warning: file_get_contents() expects at most 2 parameters, 3 given in /in/leLsu on line 13 NULL