diff --git a/i-o/README.md b/i-o/README.md index 60bd2b6..a8748d9 100644 --- a/i-o/README.md +++ b/i-o/README.md @@ -1,17 +1,15 @@ -```php -setData($data); - } +This section covers Array functionality on IO - public static function getInstance($data) - { - if (!empty($data)) return new static($data); - } -} -``` \ No newline at end of file +# Code Examples +[Here](code) + +# PHP Official Documentation + +* https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html +* http://php.net/manual/pt_BR/function.fopen.php +* http://php.net/manual/pt_BR/function.fclose.php +* http://php.net/manual/en/book.sockets.php +* http://php.net/manual/pt_BR/ref.filesystem.php +* http://php.net/manual/pt_BR/class.splfileinfo.php \ No newline at end of file diff --git a/i-o/index.php b/i-o/index.php index c286351..3bf1176 100644 --- a/i-o/index.php +++ b/i-o/index.php @@ -1,11 +1,5 @@ [ -// 'proxy' => 'ftp://proxy:3128' -// ], -// ]; -// $params = []; -// $context = stream_context_create($options, $params); -// print(file_get_contents('ftp://speedtest.tele2.net/', false, $context)); -// exit; -// print_r(file_get_contents('./zce.txt')); -// $contexto = stream_context_create([ -// 'http' => [ -// 'method' => 'POST', -// 'header' => 'Content-Type: application/x-www-form-urlencoded', -// 'content' => 'livro=php', -// ], -// ] -// ); -// print file_get_contents('http://marabesi.com', false, $contexto); +$options = [ + 'ftp' => [ + 'proxy' => 'ftp://proxy:3128' + ], +]; +$params = []; +$context = stream_context_create($options, $params); +print(file_get_contents('ftp://speedtest.tele2.net/', false, $context)); +exit; +print_r(file_get_contents('./zce.txt')); +$context = stream_context_create([ + 'http' => [ + 'method' => 'GET', + 'header' => 'Content-Type: text/html', + ], + ] +); +print file_get_contents('http://www.google.com', false, $context); // $put = fopen('php://input', 'r'); // print fgets($put); diff --git a/i-o/src/fclose.php b/i-o/src/fclose.php new file mode 100644 index 0000000..a73442c --- /dev/null +++ b/i-o/src/fclose.php @@ -0,0 +1,3 @@ +