套接字上下文选项

套接字上下文选项可用于所有工作在套接字上的封装协议。

<?php

$option = [
    'socket' => [
        'bindto' => '0:7000'
    ]
];
$context = stream_context_create($option);
var_dump(file_get_contents('http://www.example.com', false, $context));

results matching ""

    No results matching ""