Skip to content
Lieven Hollevoet edited this page Sep 22, 2014 · 1 revision

Before asking Misterhouse to get a webpage for display or further processing, it is good practice to make sure that you can first ACCESS the internet. E.g. that your connection is up, dns is working, etc.

Misterhouse uses a simple Boolean command to accomplish this:

&net_connect_check

It will return true if the outside internet can be reached.

For example I want to go get some webpage:

my $somepage_data_f = "$config_parms{data_dir}/web/mydatafilename.html"; # use the config parms to point us to the data directory for web

  1. and the last part is the actual name of the data file I want to create
my $tx60_check_u = "http://www.google.com"; # The url of the page you want to retreive as the file name above

$p_tx60_check = new Process_Item qq[get_url]; # this forks the process outside of the mh looop to get the file

  1. calls the get_url command and places my file where I told it
start $p_tx60_check if ($New_Minute and $Minute == 7 and &net_connect_check);

Original page created 20120826 revision date:

Clone this wiki locally