I discovered Ajax after a response to my last question and the code provided works fine:
<table class="my-data-table">
<tr>
<td class="col-1"></td>
<td class="col-2"></td>
<td class="col-3"></td>
</tr>
</table>
<script>
$.get( "/path_to_table_data.php", function on_table_data_load( data ) {
$( ".my-data-table .col-3" ).html( data );
});
</script>
This loads the content from the external page when it has completed execution, even though this external page outputs content as it loads.
Is there any way to have the content be returned to the calling page as the content is output by the external page, rather than waiting for it to complete?
If your data is very big, you can send parital data to client from server instead of using ajax request . While you are processing data on server side, it will be difficult to read partial responses in js side. So, I recommend you to websocket implementation of php. You can see what is Websockets, and have a look at examples in php here
Update: Stream Url
<?php
$handle = fopen("path_tu_html_url", "r");
while (!feof($handle)) {
$line = stream_get_line($handle, 1000000, "
");
}
?>
This will be on php side