Wednesday, March 21, 2007

Converted Weather Perl script over to PHP

display

Since I had the weather script working, I wanted to take the time and convert it over to PHP before going into more elaborate work. I’ll start to break out segments of the program into separate files. It should make maintenance easier. The conversion worked on the first try. The differences in syntax between Perl and PHP are not that great. The big difference is in the random number generator. My first pass at looking for examples on random number generation for PHP found only an integer generator. No big deal. Place a max range and divide by max rand and I get a real number between 0 and 1.

It appears that less energy is being passed through with this random generator. I’ll run through several tests. And make some adjustments.

The php script might be slower, or it’s speed decline could be caused by the web server or going over the network. Doesn’t really matter, as the scripts start to get finalized, parts of it will be changing over to database procedures and packages.

Labels:

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home