Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Fetching Data from Web Server Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ibscas
Groupie
Groupie


Joined: October 18 2008
Location: United States
Online Status: Offline
Posts: 46
Posted: October 26 2008 at 17:14 | IP Logged Quote ibscas

I am writing my own web interface to PH. This is mostly so I can use my iPod Touch's easily with PH. I've developed a pretty slick front end, now it's time to tackle the back end so the pretty front end actually DOES something .

I've been struggling with either using IIS and porting to PH or just using PH directly, the problem is that I don't know anything about doing web pages under PH. I remember reading that it will run activeX pages, but don't know the dynamics.

If I were to write a simple program that was going to run a function using my own web page, how would I interface with PH? Is there an include or something I need in order to get at the PH functions or is it all URLs to the PH web server?

So, let say I set up a HTML page that has nothing more than an ON and OFF button, how do I get that to talk to PH and actually run an ON or OFF command to a device?

Is it better to do PHP pages to talk to PH, or VBSCRIPT or what?

Thanks!

Edited by ibscas - October 26 2008 at 17:15
Back to Top View ibscas's Profile Search for other posts by ibscas
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 26 2008 at 18:26 | IP Logged Quote TonyNo

You may want to look into converting your HTML files to PH PSP pages. They are like HTML, but PH parses them when served.

PH parses anything between "<%" and "%>". Inside these, you can use PH functions.

Setup the web server in the PH Explorer, Web and dig in!

Quote:
So, let say I set up a HTML page that has nothing more than an ON and OFF button, how do I get that to talk to PH and actually run an ON or OFF command to a device?

As an example, check this PSP page for a one-light control page. A bit more complex than a page with two buttons, so let us know if you have any questions.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
onhiatus
Senior Member
Senior Member
Avatar

Joined: May 12 2004
Location: United States
Online Status: Offline
Posts: 279
Posted: October 27 2008 at 13:21 | IP Logged Quote onhiatus

Take a look at the previous post (http://www.myx10.com/forum/forum_posts.asp?TID=1922) there are some links to what can be done from a front end.

Basically the other Tony has already said it - anything you can do in html can be done in psp. Just rename the *.html file to *.psp and it should work the same. Then sub in the parts that you want ph to supply

Have fun!
-Tony (not No)
Back to Top View onhiatus's Profile Search for other posts by onhiatus Visit onhiatus's Homepage
 
ibscas
Groupie
Groupie


Joined: October 18 2008
Location: United States
Online Status: Offline
Posts: 46
Posted: October 28 2008 at 11:15 | IP Logged Quote ibscas

Arghh.

You said PSP not PHP. There's a few hours wasted....


Edited by ibscas - October 28 2008 at 11:54
Back to Top View ibscas's Profile Search for other posts by ibscas
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: November 25 2008 at 10:04 | IP Logged Quote MrGibbage

I'm getting ready to start writing some web pages that I can hit with my smartphone (t-mobile G1). I'd love to see what you came up with, if you wouldn't mind. Screen shots of the front end and the code behind it would be appreciated, but share whatever you are comfortable with.
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 25 2008 at 14:20 | IP Logged Quote TonyNo

I thought I documented mine, but I can't find any. Here are some PDA screens...


Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum