Execute http (otherwise know cron job) whenver page is loaded (php)?

Assuming you have the fopen HTTP wrapper enabled $fp = fopen( 'somedomain.com/index.php?option=csome_op..., 'rb'); if ($fp! == false) { fclose($fp); }.

Assuming you have the fopen HTTP wrapper enabled... $fp = fopen( 'somedomain.com/index.php?option=csome_op..., 'rb'); if ($fp! == false) { fclose($fp); }.

Yes this worked. The script is executed, but then the primary page is not loading fully. And I imagine that this calls for a new question... je je je – IberoMedia Oct 12 at 2:20.

If you are on a shared server that doesn't allow fopen, another trick is to add something like this to the page This will cause the php script to be run. You may also do well to have myphpscript. Php output image headers so that the browser doesn't complain.

I like this approach even better though I was under the impression the OP wasn't in control of the remote script. To match mime types, an tag could be more appropriate – Phil Oct 12 at 3:23 As I think more about it, there are a few more things that you should do to improve the solution above. Either you could add some AJAX which inserts the above in the page after the document ready event, or have the php script send back its headers early.

Otherwise, you risk the browser holding up the loading of the page while it waits for the php to finish running. – Mike F Oct 12 at 3:28 AJAX won't work if the domain differs. In any case, it's going to be a blocking operation though images and other HTML assets are loaded in parallel by browsers.

– Phil Oct 12 at 3:33 Sticking something like ob_start(); $size = ob_get_length(); header("Content-Length: $size"); header('Connection: close'); ob_end_flush(); ob_flush(); flush(); at the top of the myphpscript. Php file should get it to return right away I believe, rather than wait for the entire php script to complete, so it shouldn't block the page noticeably. – Mike F Oct 12 at 15:20.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions