Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

stream context create function syntax tag tutorial 2013





Alert! Connect with 10,000 Chating Online. Join Now

Php stream context create () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.3.0, PHP 5)

stream_context_create -- Create a streams context

Syntax

resource stream_context_create ( [array options] )

Creates and returns a stream context with any options supplied in options preset.

options must be an associative array of associative arrays in the format $arr['wrapper']['option'] = $value. It defaults to an empty array.

Example 1. Using stream_context_create()

<?php
$opts
= array(
  
'http'=>array(
    
'method'=>"GET",
    
'header'=>"Accept-language: en\r\n" .
              
"Cookie: foo=bar\r\n"
  
)
);

$context = stream_context_create($opts);

/* Sends an http request to www.example.com
   with additional headers shown above */
$fp = fopen('http://www.example.com', 'r', false, $context);
fpassthru($fp);
fclose($fp);
?>

See also stream_context_set_option(), and Listing of supported wrappers with context options (Appendix L).

Php stream context create Function syntax tag

stream context create php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php stream context create syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online