Page 1 of 2

getting realtime.txt to another webserver

Posted: Sun 18 Aug 2013 8:16 pm
by nicp01
Hi
I should like to put the banner into a div on a different web site on a different server (eg village website) than my home personal site
what's the best way to get/copy the reatime.txt to it?
regards
Peter

Re: getting realtime.txt to another webserver

Posted: Sun 18 Aug 2013 9:21 pm
by mcrossley
Which banner do you mean Peter?

Re: getting realtime.txt to another webserver

Posted: Mon 19 Aug 2013 8:09 am
by gluepack
If you mean the same one that most of us use on here in our signature, for example, and you currently have it available then you don't need to transfer anything, it is purely a matter of including an <img> tag in their site that references the same php file that you are using...

Code: Select all

e.g. <img src="http://www.jerbils.info/banner.php" />
wrap a link round it, to take them to your website, if you like...

Code: Select all

<a href="http://www.jerbils.info" > <img src="http://www.jerbils.info/banner.php" /> </a>
(with all the conforming to standards junk, if you like)

Re: getting realtime.txt to another webserver

Posted: Mon 19 Aug 2013 10:07 am
by nicp01
wonderful, of course, thks, I havent as yet changed and displayed the banner we're all using on my personal development site (just the weather station) so wasn't thinking that way round..it is another link in the chain, I was hoping there was a way I could export the realtime.txt direct to other sites

thks
Peter

Re: getting realtime.txt to another webserver

Posted: Mon 19 Aug 2013 3:40 pm
by nicp01
have followed instructions in the php-gd banner docs

May I ask some questions please...

my wx site sits in http://www.deneview.org.uk/hgweather and works ok.. http://www.deneview.org.uk home is a test front page it hosts the banner should this work <a><img src="php/banner.php"/></a> (copied from the forum)

? where does realtime.txt sit I have edited the banner.php to hloc ./hgweather - ok I needed to set the real time ticks in cumulus to send the file

? how do you run checkserver.php, I cant remember how to do it! ok got it now http://www.deneview.org.uk/php/checkserver.php all ok

so does http://www.deneview.org.uk/php/banner.php but with no data? so

<a><img src="php/banner.php"/></a> still dont work...any ideas?

thks so far

Peter

Re: getting realtime.txt to another webserver

Posted: Mon 19 Aug 2013 5:37 pm
by gluepack
As far as transmitting realtime.txt to another site is concerned. I don't use Cumulus to FTP any of the files as it doesn't support SFTP which my host requires. So, all I do is output them. Then under Internet configuration I run an "External program" which is actually a BATch file that invokes WinSCP, passing the necessary file information to it, to do the file transfer for me. So, you could do the same to transmit a copy of realtime.txt to the other site.

Re: getting realtime.txt to another webserver

Posted: Tue 20 Aug 2013 3:58 pm
by nicp01
gluepack wrote:As far as transmitting realtime.txt to another site is concerned. I don't use Cumulus to FTP any of the files as it doesn't support SFTP which my host requires. So, all I do is output them. Then under Internet configuration I run an "External program" which is actually a BATch file that invokes WinSCP, passing the necessary file information to it, to do the file transfer for me. So, you could do the same to transmit a copy of realtime.txt to the other site.
thankyou, I understand, I'm just trying to get the fundamentals working, it must be 30 yrs since I did any useful computing..

Peter

Re: getting realtime.txt to another webserver

Posted: Tue 20 Aug 2013 4:46 pm
by nicp01
Hi, I am really struggling here all day and yesterday to display the banner and the content of realtime.txt into the banner
I must not have the paths right, it can only be this... deneview.org.uk

anyone help

regards
Peter

Re: getting realtime.txt to another webserver

Posted: Tue 20 Aug 2013 6:00 pm
by steve
You have

$SITE['hloc'] = "./hgweather";

So you're telling the script that the realtime.txt file is in a directory hgweather in the directory holding the script, ie. in php/hgweather, and that's not the case. What you probably want is

$SITE['hloc'] = "../";

You should then be able to include the image in a web page with this HTML:

<img src="http://www.deneview.org.uk/hgweather/php/banner.php">

Re: getting realtime.txt to another webserver

Posted: Wed 21 Aug 2013 9:53 am
by nicp01
ok thks

have copied your suggestions ..all looks fine in dreamweaver live but still not appearing on web page, if you view source and click on it it works??

also I'm running cumulus 24hr times 09-09Z so it rained earlier than o9z this morning ,,,and report shows no rain to day whats the best way to
sort this, I'm sure youve been asked before..

regards & many thks
Peter

Re: getting realtime.txt to another webserver

Posted: Wed 21 Aug 2013 9:53 am
by nicp01
I shall get there wont I?

Peter

Re: getting realtime.txt to another webserver

Posted: Wed 21 Aug 2013 10:15 am
by steve
nicp01 wrote:have copied your suggestions ..all looks fine in dreamweaver live but still not appearing on web page,
It displays fine on http://www.deneview.org.uk/ for me.
2013-08-21 11_19_02-www.deneview.org.uk.png
Do you have an advert blocker, perhaps?
also I'm running cumulus 24hr times 09-09Z so it rained earlier than o9z this morning ,,,and report shows no rain to day whats the best way to
sort this, I'm sure youve been asked before..
Sorry, I don't understand. If your meteorological day ends at 0900 and it hasn't rained since then, you have had no rain "today". If you want to also display the rain since midnight, you can use the web tag <#rmidnight>

Re: getting realtime.txt to another webserver

Posted: Wed 21 Aug 2013 10:25 am
by nicp01
ok thks, which browser are you using....I'm using chrome maybe I need to use a css reset.,,.......ah I viewed with IE and its fine!

Just having a PC shuffle, this is a new dell windows 8.1 so havent copied all the browsers for DW preview, old dell currently connected to weather station, which is then going to be installed on an old laptop with battery as power out several times here in last few weeks has knacked my freezer my heating clock and doesnt help the computers



Thks I see, the banner doesn't explain the 09 to 09 as the cumulus web page does

I shall press on

many thks
peter

Re: getting realtime.txt to another webserver

Posted: Wed 21 Aug 2013 10:33 am
by steve
nicp01 wrote:ok thks, which browser are you using
It works for me in Chrome, Firefox and IE - as long as I don't run an ad blocker on the page.

Re: getting realtime.txt to another webserver

Posted: Wed 21 Aug 2013 10:38 am
by nicp01
never ever thought of my use of adblock plus just shows you I'm getting to old for this game

thks once again
Peter