Client Pre-emptive Iframe Crontab Curl Tutorial

Client Pre-emptive Iframe Crontab Curl Tutorial

Client Pre-emptive Iframe Crontab Curl Tutorial

Recap to yesterday …

We don’t know if “Client Pre-emptive Iframe” is a concept, but even if it isn’t, we’d like to say something about it today.

To us, it’s the idea that in the web application world, at the client end of things, with Javascript, though there is no file manipulation as such, there is what we’d like to term “Client Pre-emptive Iframe”, as an idea that Javascript functionality teamed with an HTML iframe (and its onload event logic) can achieve a bit of what a serverside language like PHP or ASP.Net can achieve, in terms of using server files, by guessing about their existence as the src= parameter of an HTML iframe element, and sort of “sucking it, and seeing” whether the operation succeeds … ie. pre-emptive guessing, we guess. The point is, even if the guess is wrong, no huge harm is done, and in Javascript, it can be checked for, so why stress out, man person?

… as you can see, also, at Client Pre-emptive Iframe Primer Tutorial.

Today’s HTML/Javascript work of continuous_report.html teams this concept with a Linux web server’s …

… (what a duo!) … where we set up a “Continuous Report” on our web server, where an HTML report is placed via the crontab job …


*/1 * * * * curl //www.rjmprogramming.com.au/HTMLCSS/continuous_report.php

… repeated every minute using the PHP continuous_report.php (source code) to report on the number of web server processes are running at this snapshot of time at the www.rjmprogramming.com.au web server, which happens to be Linux … otherwise for a Windows web server we’d probably have used a Windows Schedular Batch File setup.

Here, we are very close to the territory of feeds, or shared reporting.

Dates and times fly around everywhere with the code for such reporting, as do timezones relevant to your web server, up at the continuous_report.html Javascript client code.

So try a live run to see what we mean.


Previous relevant Client Pre-emptive Iframe Primer Tutorial is shown below.

Client Pre-emptive Iframe Primer Tutorial

Client Pre-emptive Iframe Primer Tutorial

We don’t know if “Client Pre-emptive Iframe” is a concept, but even if it isn’t, we’d like to say something about it today.

To us, it’s the idea that in the web application world, at the client end of things, with Javascript, though there is no file manipulation as such, there is what we’d like to term “Client Pre-emptive Iframe”, as an idea that Javascript functionality teamed with an HTML iframe (and its onload event logic) can achieve a bit of what a serverside language like PHP or ASP.Net can achieve, in terms of using server files, by guessing about their existence as the src= parameter of an HTML iframe element, and sort of “sucking it, and seeing” whether the operation succeeds … ie. pre-emptive guessing, we guess. The point is, even if the guess is wrong, no huge harm is done, and in Javascript, it can be checked for, so why stress out, man person?

So, today, we add client-side “Client Pre-emptive Iframe” business logic functionality, to yesterday’s XML to HTML PHP Three Ways Translation Tutorial, by only adding additional Emailing functionality should an address book HTML file exist at the server. That extra functionality adds an “Email” button.

So that is conditional functionality … unconditionally we add functionality to be able to send “client” “mailto:” email messages should the XML contain id= parameters and <to> … </to> or its ilk defined via the HTML textarea populated and its associated HTML input submit button pressed.

This is a clunky equivalent to PHP’s file_exists method for Javascript client usage, and an aid to determinations of whether specific business logic comes into play.

The HTML code you can call xml_to_html.html and it changed from previously in this way, or you can try a live run, or you can try a live run without the email onload event functionailty.

The PHP code you can call xml_to_html.php and it changed from yesterday in this way, but we’d like to emphasise the client side today, and want you to see that this PHP server-side functionality is optional to the whole process, or you can try a live run, or you can try a live run without the email onload event functionality.

Below we’ll leave you with some quite specific email business logic code …


<script type='text/javascript'>
// ... Some Javascript global variables regarding Client Pre-emptive Iframe addressbook usage

var preqs=location.search.split('addressbook=')[1] ? location.search.split('addressbook=')[1].split('&')[0] : "y";
var qs="?addressbook=" + (location.search.split('noaddressbook=')[1] ? location.search.split('noaddressbook=')[1].split('&')[0].toLowerCase().replace("y","n") : preqs);

// ... more Javascript

// A business logic idea ... messages/note XML with defined id= are user interactively emailable
function checkforemail() {
var ee, eo, preiu, iu, predivs,divs=[],cdivs;
var ecnt=0;
var oto='', ofrom='', osubject='', obody='';
predivs=document.body.innerHTML.toLowerCase().split(' id=');
for (preiu=1; preiu<predivs.length; preiu++) {
cdivs=predivs[preiu].substring(1).split(predivs[preiu].substring(0,1));
iu=0;
divs[iu]=document.getElementById(cdivs[0]);
try {
oto='';
ofrom='';
oheading='';
obody='';
try {
oto=divs[iu].getAttribute('data-to');
if (oto == null) oto='';
} catch (ee) {
oto='';
}
try {
ofrom=divs[iu].getAttribute('data-from');
if (ofrom == null) ofrom='';
} catch (ee) {
ofrom='';
}
try {
obody=divs[iu].getAttribute('data-body');
if (obody == null) obody='';
} catch (ee) {
obody='';
}
try {
osubject=divs[iu].getAttribute('data-heading');
if (osubject == null) {
osubject='';
osubject=divs[iu].getAttribute('data-subject');
if (osubject == null) osubject='';
}
} catch (ee) {
osubject='';
try {
osubject=divs[iu].getAttribute('data-subject');
if (osubject == null) osubject='';
} catch (ee) {
osubject='';
}
}
} catch (ee) {
}
if (oto != '' || obody != '' || osubject != '') {
if (document.getElementById('elinksplace').innerHTML.replace(/&amp;/g,"&").indexOf(('mailto:' + oto + '?subject=' + encodeURIComponent(osubject) + '&body=' + encodeURIComponent(obody)).replace(/&amp;/g,"&")) == -1) {
document.getElementById('elinksplace').innerHTML+='<a href="mailto:' + oto + '?subject=' + encodeURIComponent(osubject) + '&body=' + encodeURIComponent(obody) + '" id="email' + ecnt + '" style="display:none;">From ' + ofrom + "</a>";
ecnt++;
}
}
}
if (ecnt > 0) {
for (var iuc=0; iuc<ecnt; iuc++) {
eo=document.getElementById('email' + iuc);
eo.click();
}
}
}
// A business logic idea ... client pre-emptive iframe ... address book
function getaddressbook(iois) {
var qbits, ie, je, edelim='"', bdone=false;
var idx=['&lt;to&gt;','<to>','<TO>','<To>','data-to="','&lt;from&gt;','<from>','<FROM>','<From>','data-from="','&lt;cc&gt;','<cc>','<CC>','<Cc>','data-cc="','&lt;bcc&gt;','<bcc>','<BCC>','<Bcc>','data-bcc="'];
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
addresscont=aconto.body.innerHTML.replace(/\n/g, ',');
var emailinfo=addresscont.split(',');
for (ie=1; ie<eval(-1 + emailinfo.length); ie+=2) {
if (emailinfo[eval(ie - 1)] != "" && emailinfo[ie].indexOf('@') != -1) {
for (je=0; je<idx.length; je++) {
edelim='&lt;';
if (idx[je].indexOf(edelim) == -1) edelim='"';
if (idx[je].indexOf(edelim) == -1) edelim='<';
if (document.body.innerHTML.toLowerCase().indexOf(idx[je] + emailinfo[eval(ie - 1)].toLowerCase() + edelim) != -1) {
if (document.body.innerHTML.indexOf(idx[je] + emailinfo[eval(ie - 1)] + edelim) != -1) {
if (je < 4 && bdone == false) {
bdone=true;
document.getElementById('bemail').style.display='block';
}
while (document.body.innerHTML.indexOf(idx[je] + emailinfo[eval(ie - 1)] + edelim) != -1) {
document.body.innerHTML=document.body.innerHTML.replace(idx[je] + emailinfo[eval(ie - 1)] + edelim,idx[je] + emailinfo[eval(ie - 1)] + " [" + emailinfo[ie] + "]" + edelim);
}
}
if (document.body.innerHTML.indexOf(idx[je] + emailinfo[eval(ie - 1)].toLowerCase() + edelim) != -1) {
if (je < 4 && bdone == false) {
bdone=true;
document.getElementById('bemail').style.display='block';
}
while (document.body.innerHTML.indexOf(idx[je] + emailinfo[eval(ie - 1)].toLowerCase() + edelim) != -1) {
document.body.innerHTML=document.body.innerHTML.replace(idx[je] + emailinfo[eval(ie - 1)].toLowerCase() + edelim,idx[je] + emailinfo[eval(ie - 1)].toLowerCase() + " [" + emailinfo[ie] + "]" + edelim);
}
}
if (document.body.innerHTML.indexOf(idx[je] + emailinfo[eval(ie - 1)].toUpperCase() + edelim) != -1) {
if (je < 4 && bdone == false) {
bdone=true;
document.getElementById('bemail').style.display='block';
}
while (document.body.innerHTML.indexOf(idx[je] + emailinfo[eval(ie - 1)].toUpperCase() + edelim) != -1) {
document.body.innerHTML=document.body.innerHTML.replace(idx[je] + emailinfo[eval(ie - 1)].toUpperCase() + edelim,idx[je] + emailinfo[eval(ie - 1)] + " [" + emailinfo[ie].toUpperCase() + "]" + edelim);
}
}
}
}
}
}
}
}
}
}
// A business logic idea ... email via XML instructions
function emailit() {
var fs=document.getElementsByTagName('form');
var tas=document.getElementsByTagName('textarea');
if (tas.length >= 3) {
tas[2].innerHTML=tas[0].innerHTML;
fs[0].submit();
}
}

</script>
</head>
<body onload="translate(inxml); if (inxml != preinxml) { checkforemail(); } " style='background-color:orange;'>
<h1 align='center'>XML to HTML - HTML Homegrown - RJM Programming - September, 2015</h1>
<div id='elinksplace'><iframe src="addressbook.html" id="eabook" onload=" if (qs.indexOf('=n') == -1) { getaddressbook(this); } " style="display:none;"></iframe><input onclick=" emailit();" type="button" value="Email" style="display:none;position:absolute;top:280px;left:30px;z-index:7;" id="bemail"></input></div>
</body>
</html>

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Operating System, Tutorials and tagged , , , , , , , , , , , , . Bookmark the permalink.

60 Responses to Client Pre-emptive Iframe Crontab Curl Tutorial

  1. I got what you mean , saved to bookmarks , really decent website.

  2. Pretty great post. I simply stumbled upon your blog and wanted to mention that I have truly enjoyed surfing around your weblog posts. After all I will be subscribing in your feed and I hope you write again very soon!|

  3. college says:

    Respect to internet site author , some very good selective details .

  4. I loved as considerably as you will receive carried out appropriate here. The sketch is attractive, your authored material stylish. nonetheless, you command get got an nervousness more than which you wish be delivering the following. unwell unquestionably come far more formerly again as exactly the same nearly a good deal often inside case you shield this hike.

  5. excellent issues altogether, you just received a new reader. What would you recommend about your put up that you made some days in the past? Any sure?|

  6. mythbeats says:

    Oh my goodness! an superb write-up dude. Thank you Nevertheless I’m experiencing difficulty with ur rss . Do not know why Cannot register for it. Could there be any person getting identical rss difficulty? Anybody who knows kindly respond. Thnkx

  7. effect says:

    It is in reality a great and useful piece of information. I am satisfied that you shared this useful information with us. Please keep us informed like this. Thank you for sharing.

  8. read this says:

    Enjoy the post you furnished.. Is not it great after you find a very good submit? Is not it excellent if you uncover a good post? I appreciate you revealing your point of view..

  9. finance blog says:

    Anyways thanks for your suggestions. I value it. Please make more articles connected to this

  10. Thanks , I have just been searching for information about this subject for a long time and yours is the greatest I have found out so far. But, what about the conclusion? Are you positive about the source?

  11. whoah this weblog is fantastic i really like reading your articles. Stay up the good paintings! You recognize, lots of people are hunting around for this information, you could help them greatly.

  12. It¡¦s truly a great and helpful piece of info. I¡¦m happy that you shared this helpful information with us. Please stay us informed like this. Thanks for sharing.

  13. Great info and straight to the point. I am not sure if this is in fact the best place to ask but do you folks have any thoughts on where to hire some professional writers? Thanks :)

  14. Wall Lights says:

    Hi there, You’ve done an incredible job. I’ll definitely digg it and personally recommend to my friends. I’m sure they will be benefited from this website.

  15. Hello. remarkable job. I did not anticipate this. This is a impressive story. Thanks!

  16. Excellent weblog here! Additionally your website lots up fast! What host are you using? Can I am getting your affiliate hyperlink for your host? I desire my web site loaded up as fast as yours lol

  17. You made a few good points there. I did a search on the subject and found the majority of folks will have the same opinion with your blog.

  18. technology says:

    Anyways thanks for your ideas. I value it. Please make more write-ups connected to this

  19. topics as well as share it with us. I think it will certainly aid a lot of people. Many thanks

  20. I would like to thank you for the efforts you’ve put in writing this blog. I am hoping the same high-grade website post from you in the upcoming also. In fact your creative writing abilities has encouraged me to get my own web site now. Really the blogging is spreading its wings rapidly. Your write up is a good example of it.

  21. You made some good points there. I did a search on the topic and found most persons will consent with your site.

  22. you’re really a good webmaster. The website loading velocity is incredible. It kind of feels that you’re doing any unique trick. Furthermore, The contents are masterwork. you’ve done a wonderful task in this subject!

  23. I not to mention my buddies were found to be examining the best tactics located on your web blog while unexpectedly I got an awful suspicion I never thanked the blog owner for those techniques. The women were definitely consequently excited to study them and already have in reality been taking pleasure in these things. We appreciate you actually being very accommodating as well as for picking out these kinds of brilliant areas most people are really desperate to be aware of. Our sincere regret for not expressing gratitude to sooner.

  24. I’m completely agree with your claim or the important things that you have actually shared right here in this website.

  25. I would like to thank you for the efforts you have put in writing this website. I am hoping the same high-grade website post from you in the upcoming as well. In fact your creative writing skills has inspired me to get my own web site now. Actually the blogging is spreading its wings quickly. Your write up is a great example of it.

  26. Hiya very cool blog!! Man .. Beautiful .. Superb .. I will bookmark your website and take the feeds also¡KI’m happy to search out numerous useful information right here in the submit, we need work out more techniques in this regard, thank you for sharing. . . . . .

  27. wonderful post, very informative. I ponder why the opposite specialists of this sector do not realize this. You should continue your writing. I am sure, you’ve a great readers’ base already!

  28. I just couldn’t depart your site before suggesting that I really enjoyed the usual information an individual supply on your visitors? Is going to be back steadily to check up on new posts

  29. I like what you guys are up also. Such smart work and reporting! Keep up the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my web site :)

  30. Thanks a lot for sharing this with all folks you actually understand what you’re talking approximately! Bookmarked. Please additionally consult with my web site =). We will have a link exchange agreement between us!

  31. Thanks for any other magnificent article. The place else could anybody get that type of information in such an ideal way of writing? I’ve a presentation next week, and I am on the search for such info.

  32. You could certainly see your enthusiasm in the work you write. The sector hopes for more passionate writers like you who are not afraid to mention how they believe. At all times follow your heart.

  33. There is evidently a lot to realize about this. I suppose you made some good points in features also.

  34. tech says:

    you are really a good webmaster. The web site loading pace is incredible. It sort of feels that you’re doing any distinctive trick. Moreover, The contents are masterwork. you have done a wonderful process on this topic!

  35. As I website possessor I believe the content material here is rattling great , appreciate it for your efforts. You should keep it up forever! Good Luck.

  36. I in addition to my pals have already been examining the great techniques found on your web page and quickly got an awful feeling I never expressed respect to the web blog owner for those techniques. Those guys had been certainly very interested to learn them and already have in truth been tapping into these things. Many thanks for indeed being considerably accommodating and for obtaining these kinds of extraordinary subject areas millions of individuals are really wanting to know about. My very own sincere regret for not expressing appreciation to you sooner.

  37. Whats up very cool site!! Guy .. Excellent .. Wonderful .. I’ll bookmark your web site and take the feeds also¡KI am satisfied to seek out so many useful info here within the publish, we want develop more strategies in this regard, thank you for sharing. . . . . .

  38. Useful information. Fortunate me I discovered your web site accidentally, and I’m shocked why this accident didn’t came about earlier! I bookmarked it.

  39. wonderful post, very informative. I wonder why the other specialists of this sector don’t understand this. You must proceed your writing. I’m confident, you have a great readers’ base already!

  40. Cool article it’s really. Friend on mine has long been awaiting just for this content material.

  41. Buy Houses says:

    My husband and i have been now delighted that Albert could carry out his reports using the precious recommendations he acquired from your own web page. It’s not at all simplistic to simply possibly be giving for free thoughts which people today may have been making money from. And we consider we have got the writer to thank because of that. The main illustrations you have made, the simple web site navigation, the friendships your site make it easier to foster – it’s all awesome, and it is making our son in addition to our family reckon that this topic is entertaining, and that is unbelievably serious. Thanks for the whole lot!

  42. I¡¦m no longer positive where you are getting your info, however good topic. I must spend a while finding out much more or understanding more. Thank you for excellent information I was on the lookout for this info for my mission.

  43. I together with my guys were following the good helpful tips found on your web site while the sudden developed an awful suspicion I never thanked the site owner for those techniques. Most of the boys ended up for that reason stimulated to see all of them and have now clearly been tapping into them. Appreciation for being simply helpful as well as for considering this sort of terrific useful guides millions of individuals are really needing to be aware of. My very own sincere apologies for not expressing gratitude to sooner.

  44. I’ve been absent for a while, but now I remember why I used to love this web site. Thanks , I¡¦ll try and check back more frequently. How frequently you update your site?

  45. I must show some appreciation to you just for rescuing me from such a predicament. After researching through the world-wide-web and obtaining opinions which were not productive, I figured my life was done. Living without the presence of approaches to the problems you have resolved by means of this guide is a crucial case, as well as the kind that would have in a wrong way affected my career if I hadn’t come across your web site. Your own personal skills and kindness in playing with everything was excellent. I am not sure what I would have done if I had not come across such a subject like this. It’s possible to at this time look forward to my future. Thanks for your time very much for the expert and results-oriented help. I won’t be reluctant to propose your web page to anybody who should receive guidance on this topic.

  46. Thanks for sharing superb informations. Your site is very cool. I’m impressed by the details that you¡¦ve on this web site. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my pal, ROCK! I found simply the info I already searched everywhere and just couldn’t come across. What a perfect web-site.

  47. Relationship says:

    What i don’t understood is actually how you are no longer really much more well-appreciated than you might be now. You are so intelligent. You know therefore significantly on the subject of this matter, produced me in my opinion consider it from so many varied angles. Its like men and women don’t seem to be involved except it¡¦s something to do with Girl gaga! Your own stuffs excellent. At all times maintain it up!

  48. Definitely believe that which you said. Your favorite justification seemed to be on the net the easiest thing to be aware of. I say to you, I certainly get irked while people consider worries that they just do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks

  49. Remodeling says:

    I do believe all the concepts you have introduced on your post. They’re really convincing and can certainly work. Nonetheless, the posts are very quick for beginners. Could you please prolong them a little from subsequent time? Thank you for the post.

  50. I get pleasure from, lead to I found just what I used to be looking for. You’ve ended my 4 day long hunt! God Bless you man. Have a great day. Bye

  51. fitness says:

    Hello.This article was really motivating, particularly since I was browsing for thoughts on this matter last Tuesday.

  52. Healthy Life says:

    Thank you a lot for sharing this with all folks you actually realize what you are talking approximately! Bookmarked. Please additionally seek advice from my site =). We may have a hyperlink trade arrangement among us!

  53. I have been absent for a while, but now I remember why I used to love this web site. Thank you, I¡¦ll try and check back more frequently. How frequently you update your site?

  54. Find Love says:

    Hello very nice blog!! Man .. Beautiful .. Superb .. I’ll bookmark your site and take the feeds additionally¡KI am glad to find so many helpful information right here in the submit, we want develop extra strategies on this regard, thanks for sharing. . . . . .

  55. Whats Taking place i am new to this, I stumbled upon this I’ve found It positively helpful and it has aided me out loads. I hope to give a contribution & help different customers like its aided me. Great job.

  56. Thank you for your own effort on this website. My daughter delights in working on research and it’s easy to understand why. A number of us notice all of the compelling means you make priceless tactics through this web site and inspire participation from other individuals on that concern so our favorite girl is certainly studying a great deal. Have fun with the remaining portion of the year. You are always doing a splendid job.

  57. good stuff. Now I would like to contribute here by sharing this cool site with downloads, that personally helped me collect some beautiful and easy to use. check it out at http://scarab13.com.

  58. You made some decent points there. I did a search on the issue and found most guys will approve with your website.

  59. Wonderful site. Lots of helpful information here. I am sending it to some buddies ans additionally sharing in delicious. And of course, thanks for your effort!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>