How to put geiger counter readings on your own website

More
10 years 3 weeks ago - 10 years 3 weeks ago #40 by mw0uzo
1. Get the last reading submitted to radmon.org for a particular station

Remember to replace my username with yours.
<img src="http://www.radmon.org/radmon.php?function=cpmreading&user=mw0uzo" />

2. Show the raw data graph

Remember to replace my username with yours.
<img src="http://www.radmon.org/mw0uzo/graphlasthour.png" alt="" />

3. Show the 24hr graph

Remember to replace my username with yours.
<img src="http://www.radmon.org/mw0uzo/graphtoday.png" alt="" />


4. Redraw these graphs with the latest data

Remember to replace my username with yours.
<form action="http://www.radmon.org/radmon.php?user=mw0uzo&function=graphtoday&refresh=true" method="post">
  <input type="submit" value="Update daily graphs">
</form>

5. Use the FTP function in RadLog to save your local RadLog graph every x minutes

a) Tick 'Save graph to ftp'. Set the rate that you want to upload the graph, default is every 5 minutes.
b) Tick 'Supress errors' unless you are having problem with FTP and want to see the error messages.
c) Set the desired resolution
d) Check your FTP settings on your webserver, create a new FTP account if necessary. See your webhost FAQ.
e) Enter the FTP username and password
f) Enter the server address. e.g. yourserver.com
g) The uploaded filename is 'ftpchart.png'



6. CPM meter for your website
<img src="http://www.radmon.org/radmon.php?function=cpmmeter&user=mw0uzo" />
Last edit: 10 years 3 weeks ago by mw0uzo.
The following user(s) said Thank You: Frank, OM1AMJ, maredentro72, Kevinspage, Electrodemente

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago - 10 years 3 weeks ago #41 by mw0uzo
Testing out CPM meter for your website:
http://www.radmon.org/radmon.php?function=cpmmeter&user=mw0uzo

Testing last CPM reading, text only
http://www.radmon.org/radmon.php?function=cpmreading&user=mw0uzo

Ok these don't work in the new forum due to security. But they will work fine on your webpage, or in your browser.
Last edit: 10 years 3 weeks ago by mw0uzo.

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago - 10 years 3 weeks ago #65 by OM1AMJ
You can also use PHP code to obtain text value from radmon site. ;)
Example: http://viking.home.sk/om1amj/radmon.php

PHP code:
<?php

$user = "XXXXX";    //set user
$url = "http://radmon.org/radmon.php?function=showuserpage&user=$user";
$page = fopen($url, 'r');
$content = "";
while( !feof( $page ) ) {
$buffer = trim( fgets( $page, 4096 ) );
$content .= $buffer;
}

$startcpm = "Last reading: ";   //read CPM from RADMON.ORG
$endcpm = " CPM";
preg_match( "/$startcpm(.*)$endcpm/s", $content, $match);
$cpm = $match[1];

$starttime = "CPM on ";   //read time of measurements from RADMON.ORG
$endtime = "UTC at";
preg_match( "/$starttime(.*)$endtime/s", $content, $match);
$time = $match[1];

$usvh = round($cpm/175.43, 4);   //convert CPM to uSv/h (175.43 is for SBM-20 tube), change to your GM tube

echo "$user";
echo " <br />\n";
echo "$time UTC";
echo " <br />\n";
echo "$cpm CPM";
echo " <br />\n";
echo "$usvh uSv/h";

?>
Last edit: 10 years 3 weeks ago by OM1AMJ.

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #66 by mw0uzo
There is also the function

http://www.radmon.org/radmon.php?function=lastreading&user=mw0uzo

Which returns the CPM and DateTime recorded for the last reading in plaintext
53 CPM on 2014-10-26 22:55:50UTC at Cardiff, UK

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #67 by OM1AMJ
I didn't know about this feature. :(

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #68 by mw0uzo

I didn't know about this feature. :(


My bad, I will have to document more of the functions :silly:

Please Log in or Create an account to join the conversation.

Moderators: Gamma-Man
Time to create page: 0.211 seconds
Powered by Kunena Forum
Everything's free. Please support us by considering a donation. Log in first!
Solar powered Raspberry Pi 4 server stats: CPU 70% Memory 22% Swap 69% CPU temp=49.1'C Uptime 72 Days