Untested but semi-complete outline. I’m fair at this stuff but beware of cargo culting. Try to understand everything that’s going on if you’re going to use it. Any errors I make become your responsibility. :P

#!/usr/bin/env perl use strictures; use CGI ":standard"; use Date::Calc "Today"; my $pid = fork(); if ( $pid ) { hold_page(); } elsif ( $pid == 0 ) { write_php(); } else { die "Couldn't fork\n"; } exit 0; sub hold_page { print header(), start_html("OHAI"), h1("Keep panties unbunched!"), noscript("It's", (Today())[0] . ", for the love of crabcakes!" +, "Enable JS!"); print <<'_HTML_'; # <- single quote matters. <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJ +o=" crossorigin="anonymous"></script> <script> function checkPHP() { $.ajax({ url: "FILL THIS IN" ,timeout: 1000 }) .done( function( data ) { window.location.href = "FILL THIS IN"; }) .fail( function( jqXHR, textStatus, errorThrown ) { if ( textStatus === "timeout" ) { setTimeout(checkPHP, 2000); return; // Keep trying. } else if ( jqXHR.status == 404 ) { setTimeout(checkPHP, 2000); return; // Keep trying. } else { alert("WAT? " + jqXHR.status + " " + errorThrown); } }); } $(function(){ checkPHP() }); </script> _HTML_ print end_html(); } sub write_php { # Execute script that will write page # found at URL "FILL THIS IN" }

In reply to Re^3: Temp Webpage While Creating Final PHP Webpage by Your Mother
in thread Temp Webpage While Creating Final PHP Webpage by bobinyec

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.