1
2<?php
3// Read 14 characters starting from the 21st character
4$section = file_get_contents('./people.txt', FALSE, NULL, 20, 14);
5var_dump($section);
6?>
7
8
1$postdata = http_build_query([
2 'var1' => 'some content',
3 'var2' => 'doh'
4]);
5
6$opts = [
7 'https' =>
8 [
9 'method' => 'POST',
10 'header' => 'Content-Type: application/x-www-form-urlencoded',
11 'content' => $postdata
12 ]
13);
14
15$result = file_get_contents('http://example.com/submit.php', false, stream_context_create($opts));