HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

stream_get_line

Description

The stream_get_line of Stream for PHP gets line from stream resource up to a given delimiter.

Syntax

stream_get_line(
    resource $stream,
    int $length,
    string $ending = ""
): string|false

Parameters

stream

A valid file handle.

length

The maximum number of bytes to read from the handle. Negative values are not supported. Zero (0) means the default socket chunk size, i.e. 8192 bytes.

ending

An optional string delimiter.

Return

Returns a string of up to length bytes read from the file pointed to by stream, or false on failure.

Examples

1 · stream length · 0

<?

$filename = "https://osbo.com";
$mode = "r";

$stream = fopen($filename, $mode);

    $length = 0;

    $return = stream_get_line($stream, $length);

    echo $return;

fclose($stream);
<!doctype html><html lang=en><head><meta charset=utf-8><meta content=width=device-width name=viewport><meta content=osbo.com name=description><title>osbo.com</title><link defer href=/assets/css/ rel=stylesheet><link defer href=/assets/svg/ rel=icon><script defer src=/assets/js/></script><script>var _mtm = window._mtm = window._mtm || [];_mtm.push({"mtm.startTime": (new Date().getTime()), "event": "mtm.Start"});(function(){var d=document, g=d.createElement("script"), s=d.querySelector("script");g.async=true; g.src="/matomo/js/container_Gm7CI6wt.js"; s.parentNode.insertBefore(g,s);})();</script></head><body><div id=foreground><header><a href=/><img alt=Home id=home src=/assets/svg/Home.svg title=Home></a><img alt=Menu id=menu src=/assets/svg/Menu.svg title=Menu><form action=/search/><input id=search-site name=search-site title=Search type=search></form></header><footer><a href=#><img alt=Top id=top src=/assets/svg/Top.svg title=Top></a></footer></div><div id=zeroground><div id=content><header><div id=topnav><a href=/Jesus/>Jesus</a> · <a href=/Bible/>Bible</a> · <a href=/html/>HTML</a> · <a href=/css/>CSS</a> · <a href=/js/>JS</a> · <a href=/php/>PHP</a> · <a href=/svg/>SVG</a> · <a href=/applications/>Applications</a></div></header><div class=banner><script defer src=https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4239362730750625 crossorigin=anonymous></script><ins class=adsbygoogle data-ad-client=ca-pub-4239362730750625 data-ad-slot=5564639719><a href=https://samaritanspurse.org/occ/ target=_blank><img alt="Samaritan's Purse Operation Christmas Child" src=/assets/svg/SamaritansPurseOperationChristmasChild1.svg title="Samaritan's Purse Operation Christmas Child"></a></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div><main><h1><a href>Bible Image Editor</a></h1><div id=myid style=height:100vh><script>const Bibleversionarray =
        [
            [
                "العربية",
                [
                    ["ASVD", "الكتاب المقدس ترجمة فانديك وسميث (ASVD)"],
                ],
            ],
            [
                "česky",
                [
                    ["CSBKR", "Bible Kralická 1613 (CSBKR)"],
                ],
            ],
            [
                "Dansk",
                [
                    ["DA1871", "Danske Bibel 1871 (DA1871)"],
                ],
            ],
            [
                "Deutsch",
                [
                    ["DELUT", "Luther Bible 1912 (DELUT)"],
                    ["ELB", "Elberfelder 1905 (ELB)"],
                    ["ELB71", "Elberfelder 1871 (ELB71)"],
                ],
            ],
            [
                "English",
                [
                    ["ASV", "American Standard Version (ASV)"],
                    ["KJV", "King James Version (KJV)"],
                    ["WEB", "World English Bible (WEB)"],
                ],
            ],
            [
                "Español",
                [
                    ["RVES", "Reina-Valera Antigua (RVES)"],
                ],
            ],
            [
                "Suomi",
                [
                    ["FI1776", "Finnish 1776 (FI1776)"],
                    ["FINPR", "Finnish 1938 (FINPR)"],
                ],
            ],
            [
                "Français",
                [
                    ["FMAR", "Martin 1744 (FMAR)"],
                    ["FRDBY", "Bible Darby en français (FRDBY)"],
                    ["LSG", "Louis Segond 1910 (LSG)"],
                    ["OST", "Ostervald (OST)"],
                ],
            ],
            [
                "Magyar",
                [
                    ["KAR", "Károli 1590 (KAR)"],
                ],
            ],
            [
                "Bahasa Indonesia",
                [
                    ["IDBAR", "Terjemahan Baru (IDBAR)"],
                ],
            ],
            [
                "Italiano",
                [
                    ["IGD", "Giovanni Diodati Bibbia (IGD)"],
                    ["ITRIV", "Italian Riveduta 1927 (ITRIV)"],
                ],
            ],
            [
                "日本語",
                [
                    ["JA1955", "Colloquial Japanese 1955 (JA1955)"],
                ],
            ],
            [
                "Malagasy",
                [
                    ["MG1865", "Malagasy Bible (MG1865)"],
                ],
            ],
            [
                "te reo Māori",
                [
                    ["MAOR", "Maori Bible (MAOR)"],
                ],
            ],
            [
                "한국어",
                [
                    ["KORVB", "개역한글 (KORVB)"],
                ],
            ],
            [
                "Nederlands",
                [
                    ["SV1750", "Statenvertaling (SV1750)"],
                ],
            ],
            [
                "Norsk",
                [
                    ["NORSK", "Det Norsk Bibelselskap 1930 (NORSK)"],
                ],
            ],
            [
                "Polski",
                [
                    ["PBG", "Biblia Gdańska (PBG)"],
                ],
            ],
            [
                "Português",
                [
                    ["AA", "Almeida Atualizada (AA)"],
                ],
            ],
            [
                "Română",
                [
                    ["RMNN", "Romanian Cornilescu 1928 (RMNN)"],
                    ["VDC", "Versiunea Dumitru Cornilescu (VDC)"],
                    ["VDCC", "Versiunea Dumitru Cornilescu Corectată (VDCC)"],
                ],
            ],
            [
                "Pyccкий",
                [
                    ["RURSV", "Синодальный перевод (RURSV)"],
                ],
            ],
            [
                "Shqip",
                [
                    ["ALBB", "Albanian Bible (ALBB)"],
                ],
            ],
            [
                "Svenska",
                [
                    ["SK73", "Karl XII 1873 (SK73)"],
                    ["SVEN", "Svenska 1917 (SVEN)"],
                ],
            ],
            [
                "Wikang Tagalog",
                [
                    ["TLAB", "Ang Biblia (TLAB)"],
                ],
            ],
            [
                "українська",
                [
                    ["UBIO", "Біблія в пер. Івана Огієнка 1962 (UBIO)"],
                    ["UKRK", "Біблія в пер. П.Куліша та І.Пулюя 1905 (UKRK)"],
                ],
            ],
            [
                "Tiếng Việt",
                [
                    ["VI1934", "Vietnamese Bible 1934 (VI1934)"],
                ],
            ],
            [
                "简体中文",
                [
                    ["CUVS", "简体和合本 (CUVS)"],
                ],
            ],
            [
                "繁體中文",
                [
                    ["CUV", "和合本 (CUV)"],
                ],
            ],
        ];
        const Biblebookarray =
        [
            //"Genesis",
            //"John",
        ];
        const Bibleversearray =
        [
            //"In the beginning God created the heaven and the earth.",
            //"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.",
        ];
        const tabarray =
        [
            "canvas",
            "image",
            "message",
            "reference",
            "passage",
            "save",
        ];
        const borderstylearray =
        [
            "none",
            "dashed",
            "dotted",
            "double",
            "groove",
            //"hidden",
            "inset",
            "outset",
            "ridge",
            "solid",
        ];
        const horizontalarray =
        [
            "left",
            "center",
            "right",
            "justify",
        ];
        const verticalarray =
        [
            "start",
            "center",
            "end",
        ];
        const writingmodearray =
        [
            "horizontal-tb",
            "vertical-lr",
            "vertical-rl",
            "sideways-lr",
            "sideways-rl",
        ];
        const fontfamilyarray =
        [
            //generic family
            "cursive",
            "fantasy",
            "monospace",
            "sans-serif",
            "serif",

            //web safe
            //"arial",//sans-serif
            //"brush script",//serif
            "courier",
            //"garamond",//serif
            "georgia",
            "tahoma",
            //"times new roman",//serif
            "trebuchet ms",
            "verdana",

            //popular
            //"avenir",//serif
            //"bodoni",//serif
            "franklin gothic",
            //"frutiger",//serif
            //"futura",//serif
            //"helvetica",//sans-serif
            //"rockwell",//serif
            //"univers",//serif
        ];
        const fontstylearray =
        [
            "normal",
            "italic",
            //"oblique",
        ];
        const fontvariantarray =
        [
            "normal",
            "small-caps",
        ];
        const fontweightarray =
        [
            "normal",
            "bold",
            //"bolder",
            //"lighter",
        ];
        const maxheight = 10000;
        const maxwidth = 10000;
        const image = document.createElement("img");
        const text = document.createElement("img");

        function bodyload()
        {
            //const body = document.body;
            //body.id = "myid";

            const style = myid.style;
            //style.height = "100vh";
            style.overflow = "hidden";
        }
        addEventListener("load", bodyload);

        function window1load()
        {
            const div = document.createElement("div");
            div.id = "window1";
            myid.append(div);

            const style = div.style;
            style.height = "50vh";
            style.margin = "0";
        }
        addEventListener("load", window1load);

        function window2load()
        {
            const div = document.createElement("div");
            div.id = "window2";
            myid.append(div);

            const style = div.style;
            style.height = "32px";
            style.margin = "16px 0 0";
            style.overflowY = "hidden";
            style.whiteSpace = "nowrap";
        }
        addEventListener("load", window2load);

        function window3load()
        {
            const div = document.createElement("div");
            div.id = "window3";
            myid.append(div);

            const style = div.style;
            style.height = "calc(50vh - 48px)";
            style.margin = "0";
            style.overflowX = "hidden";
        }
        addEventListener("load", window3load);

        function canvasload()
        {
            const canvas = document.createElement("canvas");
            canvas.height = 1080;
            canvas.id = "canvas";
            canvas.width = 1920;
            window1.append(canvas);

            const style = canvas.style;
            style.position = "relative";
        }
        addEventListener("load", canvasload);

        function canvasupdate()
        {
            //console

2 · stream length · 16

<?

$filename = "https://osbo.com";
$mode = "r";

$stream = fopen($filename, $mode);

    $length = 16;

    $return = stream_get_line($stream, $length);

    echo $return;

fclose($stream);
<!doctype html><

3 · ending

<?

$filename = "https://osbo.com";
$mode = "r";

$stream = fopen($filename, $mode);

    $length = 0;
    $ending = "\n";

    $return = stream_get_line($stream, $length, $ending);

    echo $return;

fclose($stream);
<!doctype html><html lang=en><head><meta charset=utf-8><meta content=width=device-width name=viewport><meta content=osbo.com name=description><title>osbo.com</title><link defer href=/assets/css/ rel=stylesheet><link defer href=/assets/svg/ rel=icon><script defer src=/assets/js/></script><script>var _mtm = window._mtm = window._mtm || [];_mtm.push({"mtm.startTime": (new Date().getTime()), "event": "mtm.Start"});(function(){var d=document, g=d.createElement("script"), s=d.querySelector("script");g.async=true; g.src="/matomo/js/container_Gm7CI6wt.js"; s.parentNode.insertBefore(g,s);})();</script></head><body><div id=foreground><header><a href=/><img alt=Home id=home src=/assets/svg/Home.svg title=Home></a><img alt=Menu id=menu src=/assets/svg/Menu.svg title=Menu><form action=/search/><input id=search-site name=search-site title=Search type=search></form></header><footer><a href=#><img alt=Top id=top src=/assets/svg/Top.svg title=Top></a></footer></div><div id=zeroground><div id=content><header><div id=topnav><a href=/Jesus/>Jesus</a> · <a href=/Bible/>Bible</a> · <a href=/html/>HTML</a> · <a href=/css/>CSS</a> · <a href=/js/>JS</a> · <a href=/php/>PHP</a> · <a href=/svg/>SVG</a> · <a href=/applications/>Applications</a></div></header><div class=banner><script defer src=https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4239362730750625 crossorigin=anonymous></script><ins class=adsbygoogle data-ad-client=ca-pub-4239362730750625 data-ad-slot=5564639719><a href=https://samaritanspurse.org/occ/ target=_blank><img alt="Samaritan's Purse Operation Christmas Child" src=/assets/svg/SamaritansPurseOperationChristmasChild1.svg title="Samaritan's Purse Operation Christmas Child"></a></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div><main><h1><a href>Bible Image Editor</a></h1><div id=myid style=height:100vh><script>const Bibleversionarray =