Author Topic: Realtime php display  (Read 6119 times)

0 Members and 1 Guest are viewing this topic.

Offline anchorageweather

  • Forecaster
  • *****
  • Posts: 445
    • http://eetee.us/station/station.php
Realtime php display
« on: August 15, 2006, 10:57:27 PM »
Hello all:

This might be slightly off topic - Mods, please let me know if it is, and I will delete it.

As I try to learn a little more about php for my weather site, I was wondering if anyone knew if there was such a thing as a webpage residing on a php enabled server that would display php code in real-time without uploading the file to the server.

I've pieced together something similar for html on my site at:

http://eetee.home.mindspring.com/HTMLpreviewing/HTML%20editor%20realtime%20previewing.htm

Feel free to take a look to see what I mean.  Is it possible to make a similar page for php?

If not, is there a good piece of php authoring software, that  I can use to learn with.  Thanks for any help.
South of the Tracks, Anchorage, KY

Offline Anole

  • Forecaster
  • *****
  • Posts: 585
    • http://pineislandweather.com
Realtime php display
« Reply #1 on: August 16, 2006, 06:27:47 AM »
No way to do what you want with PHP alone that I'm aware of. PHP executes on the server side at page load. Your example is using javascript which executes on the client side.

You might want to look into AJAX to try and accomplish what you want.

As far as authoring software goes I can't help you there. I just use a text editor.

Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Realtime php display
« Reply #2 on: August 16, 2006, 10:44:30 AM »
There is a php tutorial at http://www.ibdhost.com/help/templates/ ,

Toward the top of the tutorial there are links to a couple of different php code generators.

Offline grahamsbeachweather

  • Member
  • *
  • Posts: 11
Realtime php display
« Reply #3 on: August 16, 2006, 08:04:04 PM »
:wink:

Offline carterlake

  • Senior Contributor
  • ****
  • Posts: 243
    • CarterLake.org
Realtime php display
« Reply #4 on: August 17, 2006, 07:18:32 PM »
Can't do PHP in real time... has to be AJAX with Javascript.

It's actually pretty easy to do.... surprisingly easy! Well... with Weather Display.

And see my main page: http://www.carterlake.org

Also try viewing it with Javascript disabled... very important to provide a graceful replacement for those very few people not using Javascript.

Oh, Ken's got page up on this now:

http://saratoga-weather.org/scripts-WD-AJAX.php

Davis VP2 6153; Weather Display (LIVE w/ Ajax); Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; live NOAA Radio