struggle-for-php/sfp-ishiki-takai-https

re-register https stream wrapper

1.1.0 2015-02-06 13:19 UTC

This package is auto-updated.

Last update: 2024-11-06 16:21:51 UTC


README

ISHIKI TAKAI HTTPS (意識高いHTTPS)

override global file_get_contents() behavior with padraic/humbug_get_contents.

(correctly, re-register https stream wrapper)

                / ̄二ニ=‐- ..__
              /  ノー--==ニ二う
.              i /  __ ,ヽ|           
.              | !   rqq   |l             
             {ヽ|    ゝ   |)          
.            `1  フ  |   このアプリつらいわー。file_get_contents()で、        
.             ヽ       ∧_   httpsアクセスしててまじつらいわー
            ∠二ヽ -‐' / >、       
.           /二ヽ}う / /  `  .     
           | っ_}ノVY^ヽ/        `ヽ   
           /j __ノ  l           ハ  
        } ,′ |   l    i |    __j  
         / ′  |   l      ヽ|  -‐==〉 
.         / ,   |   |       |   |
        /_′    |   |      l_____|
          |!   |   |>―-- ―┴―-        |
         |   |   |//i i r        |
.         、____,ノ   |{_ヒ`ニ7ー'ー-   __,ノ
             |      | |:::::::::|   |

Usage

<?php
// on bootstrap
require_once __DIR__.'/vendor/autoload.php';

SfpIshikiTakaiHttps\StreamWrapper::register();

// ok, go.
var_dump(file_get_contents('https://github.com/',false, $context));

Installation

$ composer require struggle-for-php/sfp-ishiki-takai-https ~1

See Also

ATTENTION

THIS PROJECT IS DEMONSTRATION FOR PHP STREAM WRAPPER USAGE, AND NOT INTENDED FOR PRODUCTION USE. PLEASE USE AT YOUR OWN RISK.