Page 1 of 1
Tips and Tricks for PHP
Posted: Tue 17 Aug 2010 7:46 pm
by Palmyweather
I was looking at developing my website into PHP. At university next year I will learn about PHP, but I would like to start developing the site now.
Does anyone have any tips or tricks for developing their site in PHP?
Matt
Re: Tips and Tricks for PHP
Posted: Tue 17 Aug 2010 10:05 pm
by TNETWeather
I have a simple (old) template system that gave many a way to get started.
You can see it below.
http://www.tnetweather.com/nb-0200/
However, there are tons of resources on the net for this stuff. There is little need for anyone with any
time,
aptitude, and
desire to easily pick this stuff up without any classes. There are so many resources available that you can get help at almost any level.
PHP also has one of the best online documentation systems of any language.
Just use Google and start the search with
PHP, such as
php date
Re: Tips and Tricks for PHP
Posted: Tue 17 Aug 2010 10:24 pm
by gemini06720
Palmyweather wrote:Does anyone have any tips or tricks for developing their site in PHP?
Matt, the only advices I can give you is read, read, try, correct, tray again...
PHP has been a great discovery for me - it is an incredible programming language and not as difficult to learn as most people presume.
Before you can start using PHP you have to make sure the ISP server where your pages are/will be hosted offers PHP and hopefully MySQL. Then it is just a matter of converting the HTML pages to PHP.
About 5 years ago when I first started with PHP I was lucky enough to have a good online tutor, unfortunately, now departed...
A good starting point with any programming languages is the editor. As mentioned in other messages, for the past 5 years I have been using Blumentals Software
WeBuilder - it is like having 6 editors into one (one can easily edit HTML, CSS, JavaScript, PHP, ASP, Ruby within a single editor) and the software is not too heavy (resources hungry). WeBuilder is not freeware, but it has been a well worth my investment.
Good documentation is also a good way to learn PHP ... but it can also get costly.
What else... Patience - indeed, one needs some patience...
But when one sees the results, one can only be proud of him/her self...
A few places/sites to check:
-
PHP Net
-
W3Schools
-
TNETWeather Notebook - Constructing an Included Web Page System
Just to name a few...

Re: Tips and Tricks for PHP
Posted: Tue 17 Aug 2010 10:33 pm
by RayProudfoot
Ray,
I knew you were good but I never realised you had the ability to forsee the weather.
Looking at this page it seems you already know the temps for 3 September 2010.
http://96.54.8.240/cumulus/record.php 
Re: Tips and Tricks for PHP
Posted: Tue 17 Aug 2010 11:07 pm
by gemini06720
Ray, what are you doing in this forum ... The forum subject is about PHP Tips and Tricks....
RayProudfoot wrote:I knew you were good but I never realised you had the ability to forsee the weather.
Looking at this page it seems you already know the temps for 3 September 2010. [link removed]

What can I do, my weather forecasting/foreseeing is as good as the software(s) that produce the data...
By the way, that information is produced by Cumulus using the '<#tempL>' and '<#TtempL>' tags and I just import into my PHP scripted page the values... Just checked the Cumulus 'All time records' window and the same values/dates are there...

There must be or have been something wrong with one of the data files...
You might find better results on this [link removed] page...

Re: Tips and Tricks for PHP
Posted: Wed 18 Aug 2010 4:20 pm
by RayProudfoot
I lurk everywhere!
That's a really nice site Raymondo.

One day I'll be able to do that hopefully.
Your rainfall total is also a bit scary. Over 100" in English!

It shouldn't be an insolvable problem finding and correcting the dodgy data in Cumulus text files.
Re: Tips and Tricks for PHP
Posted: Thu 19 Aug 2010 1:40 pm
by gemini06720
RayProudfoot wrote:I lurk everywhere!
RayProudfoot wrote:That's a really nice site Raymondo.

One day I'll be able to do that hopefully.
Not a chance...
RayProudfoot wrote:Your rainfall total is also a bit scary. Over 100" in English!

It shouldn't be an insolvable problem finding and correcting the dodgy data in Cumulus text files.
So, what is wrong with my data, what is wrong with the highest maximum temperature being 999.0 °C, the lowest maximum temperature being -500.0 °C, getting 608.7 mm of rain for the highest hourly rainfall or 611.5 mm of rain for the highest daily rainfall...
After all, this whole weather station/software is just a hobby...

Re: Tips and Tricks for PHP
Posted: Thu 19 Aug 2010 4:25 pm
by Gina
I think you have a few problems Ray-gemini

Re: Tips and Tricks for PHP
Posted: Thu 19 Aug 2010 5:00 pm
by RayProudfoot
gemini06720 wrote:RayProudfoot wrote:That's a really nice site Raymondo.

One day I'll be able to do that hopefully.
Not a chance...
You might be surprised. 15 years ago I knew nothing about Microsoft Access. Now I pride myself on producing quality databases for my employer.
gemini06720 wrote:So, what is wrong with my data, what is wrong with the highest maximum temperature being 999.0 °C, the lowest maximum temperature being -500.0 °C, getting 608.7 mm of rain for the highest hourly rainfall or 611.5 mm of rain for the highest daily rainfall...
After all, this whole weather station/software is just a hobby...

Hmmm, not quite sure if you're being serious or not. Isn't the whole point of running a weather website to reflect the conditions accurately be it a hobby or not? To spend all that time producing a great site only to spoil it with poor quality data seems like a waste of your time and visitors might not bother going back a second time. Whilst my site is far less grand (no offence to Steve) I pride myself on the quality of the data recorded by my station.
And I still don't understand why some of your all-time records are dated a month hence. Sounds like the computer the AWS is linked to has not had its date time setting checked.
Re: Tips and Tricks for PHP
Posted: Fri 20 Aug 2010 5:04 am
by gemini06720
RayProudfoot wrote:Hmmm, not quite sure if you're being serious or not.
Ray, I am not serious...
RayProudfoot wrote:Isn't the whole point of running a weather website to reflect the conditions accurately be it a hobby or not?
The Cumulus produced weather pages are not my weather pages - the [link removed] pages are 'THE OFFICIAL' weather pages ... as known and used by the users in my geographical area (the south-eastern part of Vancouver Island in British Columbia)...
Please remember that the pages you have looked at are 'development' pages - they are hosted on my home/office computer server and are only available through the Internet for my testing purposes...
RayProudfoot wrote:To spend all that time producing a great site only to spoil it with poor quality data seems like a waste of your time and visitors might not bother going back a second time.
The general public is not aware of my 'development' site unless invited through a direct link, as posted in the Cumulus forums.
RayProudfoot wrote:And I still don't understand why some of your all-time records are dated a month hence. Sounds like the computer the AWS is linked to has not had its date time setting checked.
The Cumulus on my home/office server is using the weather data it downloads from a Davis Vantage Vue console - the weather data from the Vantage Vue is downloaded by the SoftWx Virtual VP software.
The Davis Vantage Vue console is receiving the data transmitted by the Davis Vantage Pro Plus weather station. The clock on the Vantage Vue is at the right time and date - the clock of the Vantage Vue console is regularly update by the SoftWx VP Live software.
Why the weather data posted on the 'development' pages is corrupted, I do not know, and I do not think I will spend much time looking for and trying to correct the problem - I need all of my time to continue developing and adapting scripts to my 'development' pages and, even if the weather data happens to be erroneous, it does not affect the page creation nor the stability of the scripts ... which is more important to me...
I am now just getting my 'feet wet' learning on how to incorporate a MySQL database into my 'development' pages...

Re: Tips and Tricks for PHP
Posted: Fri 20 Aug 2010 10:15 am
by Palmyweather
Just face it, he's in control of the weather, and he's responsible for global warming - well, with the weather data you're producing it seems that way...

Re: Tips and Tricks for PHP
Posted: Fri 20 Aug 2010 11:52 am
by gemini06720
Palmyweather wrote:...well, with the weather data you're producing it seems that way...

Do not be a smart guy ... otherwise I will send all the rain that China, Pakistan, India are getting onto your islands...

Re: Tips and Tricks for PHP
Posted: Sat 21 Aug 2010 2:22 am
by Super-T
It's already here Gemini
I blame the Aussies...they keep sending all this rain across the Tasman Sea.
Spring has sprung.
Re: Tips and Tricks for PHP
Posted: Sat 21 Aug 2010 5:15 am
by DaveNZ
Super-T wrote:It's already here Gemini
I blame the Aussies...they keep sending all this rain across the Tasman Sea.
Spring has sprung.
Yeah I'm sick of all the rain too! We've only had about 4 days with nil rain this month...
Re: Tips and Tricks for PHP
Posted: Sat 21 Aug 2010 10:21 am
by Palmyweather
Despite being on the west cost, we're rather dry at the moment. 3 days with no rain. Palmy never gets the "good" weather (bad weather). It's rather plassid.