Can I get the PHP response size inflight?How can I prevent SQL injection in PHP?Deleting an element from an array in PHPHow do I get PHP errors to display?How do I get a YouTube video thumbnail from the YouTube API?How do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?Get the full URL in PHPHow does PHP 'foreach' actually work?Reference - What does this error mean in PHP?Why shouldn't I use mysql_* functions in PHP?

How can I improve my formal definitions?

How to correctly set logical high level on PS/2 port?

Punishment in pacifist society

Why does the U.S. military maintain their own weather satellites?

Why didn't Thatcher give Hong Kong to Taiwan?

Why don't "echo -e" commands seem to produce the right output?

Is Chuck the Evil Sandwich Making Guy's head actually a sandwich?

Single vs Multiple Try Catch

Quick Slitherlink Puzzles: KPK and 123

Underbrace in equation

What are the French equivalents of "blow away the cobwebs"?

Can a human variant take proficiency in initiative?

Can users with the same $HOME have separate bash histories?

Could a simple hospital oxygen mask protect from aerosol poison?

In Toy Story, are toys the only inanimate objects that become alive? And if so, why?

Can a system of three stars exist?

The 7-numbers crossword

Can UV radiation be safe for the skin?

Using font to highlight a god's speech in dialogue

How do I get my neighbour to stop disturbing with loud music?

New coworker has strange workplace requirements - how should I deal with them?

What is the practical impact of using System.Random which is not cryptographically random?

What are the electrical characteristics of a PC gameport?

Divide Numbers by 0



Can I get the PHP response size inflight?


How can I prevent SQL injection in PHP?Deleting an element from an array in PHPHow do I get PHP errors to display?How do I get a YouTube video thumbnail from the YouTube API?How do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?Get the full URL in PHPHow does PHP 'foreach' actually work?Reference - What does this error mean in PHP?Why shouldn't I use mysql_* functions in PHP?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Is it possible to get the number of bytes that have been sent back (or otherwise will be sent) to the client?



I will not use ob_start() because I cannot ensure that all output sent to the client can be guaranteed, even in the case of a fatal failure. Also, since it's an old complex web application I am not going to interfere with its output.










share|improve this question


























  • You could wrap your whole script in ob_start and ob_end_clean. Save the value of ob_end_clean and use strlen on it. Simply echo the saved value after you're done to send the actual response.

    – ccKep
    Mar 28 at 0:34







  • 1





    Might be something the webserver can do better than PHP...have a look at its logging capabilities. Unless you somehow want to use it in the code to do something more than just logging?

    – ADyson
    Mar 28 at 0:38











  • php.net/manual/en/function.ob-get-length.php

    – Alex
    Mar 28 at 0:59











  • I've updated the question to qualify that ob_start is not an option.

    – Elliot Chance
    Mar 28 at 3:14











  • For what purpose do you need this? It matters, because there are lots of places to get this data, each with varying degrees of accuracy and conditions.

    – Brad
    Mar 28 at 3:23

















0















Is it possible to get the number of bytes that have been sent back (or otherwise will be sent) to the client?



I will not use ob_start() because I cannot ensure that all output sent to the client can be guaranteed, even in the case of a fatal failure. Also, since it's an old complex web application I am not going to interfere with its output.










share|improve this question


























  • You could wrap your whole script in ob_start and ob_end_clean. Save the value of ob_end_clean and use strlen on it. Simply echo the saved value after you're done to send the actual response.

    – ccKep
    Mar 28 at 0:34







  • 1





    Might be something the webserver can do better than PHP...have a look at its logging capabilities. Unless you somehow want to use it in the code to do something more than just logging?

    – ADyson
    Mar 28 at 0:38











  • php.net/manual/en/function.ob-get-length.php

    – Alex
    Mar 28 at 0:59











  • I've updated the question to qualify that ob_start is not an option.

    – Elliot Chance
    Mar 28 at 3:14











  • For what purpose do you need this? It matters, because there are lots of places to get this data, each with varying degrees of accuracy and conditions.

    – Brad
    Mar 28 at 3:23













0












0








0








Is it possible to get the number of bytes that have been sent back (or otherwise will be sent) to the client?



I will not use ob_start() because I cannot ensure that all output sent to the client can be guaranteed, even in the case of a fatal failure. Also, since it's an old complex web application I am not going to interfere with its output.










share|improve this question
















Is it possible to get the number of bytes that have been sent back (or otherwise will be sent) to the client?



I will not use ob_start() because I cannot ensure that all output sent to the client can be guaranteed, even in the case of a fatal failure. Also, since it's an old complex web application I am not going to interfere with its output.







php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 3:14







Elliot Chance

















asked Mar 28 at 0:31









Elliot ChanceElliot Chance

2,5505 gold badges29 silver badges54 bronze badges




2,5505 gold badges29 silver badges54 bronze badges















  • You could wrap your whole script in ob_start and ob_end_clean. Save the value of ob_end_clean and use strlen on it. Simply echo the saved value after you're done to send the actual response.

    – ccKep
    Mar 28 at 0:34







  • 1





    Might be something the webserver can do better than PHP...have a look at its logging capabilities. Unless you somehow want to use it in the code to do something more than just logging?

    – ADyson
    Mar 28 at 0:38











  • php.net/manual/en/function.ob-get-length.php

    – Alex
    Mar 28 at 0:59











  • I've updated the question to qualify that ob_start is not an option.

    – Elliot Chance
    Mar 28 at 3:14











  • For what purpose do you need this? It matters, because there are lots of places to get this data, each with varying degrees of accuracy and conditions.

    – Brad
    Mar 28 at 3:23

















  • You could wrap your whole script in ob_start and ob_end_clean. Save the value of ob_end_clean and use strlen on it. Simply echo the saved value after you're done to send the actual response.

    – ccKep
    Mar 28 at 0:34







  • 1





    Might be something the webserver can do better than PHP...have a look at its logging capabilities. Unless you somehow want to use it in the code to do something more than just logging?

    – ADyson
    Mar 28 at 0:38











  • php.net/manual/en/function.ob-get-length.php

    – Alex
    Mar 28 at 0:59











  • I've updated the question to qualify that ob_start is not an option.

    – Elliot Chance
    Mar 28 at 3:14











  • For what purpose do you need this? It matters, because there are lots of places to get this data, each with varying degrees of accuracy and conditions.

    – Brad
    Mar 28 at 3:23
















You could wrap your whole script in ob_start and ob_end_clean. Save the value of ob_end_clean and use strlen on it. Simply echo the saved value after you're done to send the actual response.

– ccKep
Mar 28 at 0:34






You could wrap your whole script in ob_start and ob_end_clean. Save the value of ob_end_clean and use strlen on it. Simply echo the saved value after you're done to send the actual response.

– ccKep
Mar 28 at 0:34





1




1





Might be something the webserver can do better than PHP...have a look at its logging capabilities. Unless you somehow want to use it in the code to do something more than just logging?

– ADyson
Mar 28 at 0:38





Might be something the webserver can do better than PHP...have a look at its logging capabilities. Unless you somehow want to use it in the code to do something more than just logging?

– ADyson
Mar 28 at 0:38













php.net/manual/en/function.ob-get-length.php

– Alex
Mar 28 at 0:59





php.net/manual/en/function.ob-get-length.php

– Alex
Mar 28 at 0:59













I've updated the question to qualify that ob_start is not an option.

– Elliot Chance
Mar 28 at 3:14





I've updated the question to qualify that ob_start is not an option.

– Elliot Chance
Mar 28 at 3:14













For what purpose do you need this? It matters, because there are lots of places to get this data, each with varying degrees of accuracy and conditions.

– Brad
Mar 28 at 3:23





For what purpose do you need this? It matters, because there are lots of places to get this data, each with varying degrees of accuracy and conditions.

– Brad
Mar 28 at 3:23












1 Answer
1






active

oldest

votes


















0















No.



Theoretically a SAPI could count that, but in most cases this doesn't serve any purpose so it'S not done.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388466%2fcan-i-get-the-php-response-size-inflight%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0















    No.



    Theoretically a SAPI could count that, but in most cases this doesn't serve any purpose so it'S not done.






    share|improve this answer





























      0















      No.



      Theoretically a SAPI could count that, but in most cases this doesn't serve any purpose so it'S not done.






      share|improve this answer



























        0














        0










        0









        No.



        Theoretically a SAPI could count that, but in most cases this doesn't serve any purpose so it'S not done.






        share|improve this answer













        No.



        Theoretically a SAPI could count that, but in most cases this doesn't serve any purpose so it'S not done.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 3:19









        johannesjohannes

        13.6k1 gold badge35 silver badges55 bronze badges




        13.6k1 gold badge35 silver badges55 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388466%2fcan-i-get-the-php-response-size-inflight%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현