[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
[200] Open html from cgi?
05-06-2011, 01:00 PM (This post was last modified: 05-06-2011 07:04 PM by dc11ab.)
Post: #1
Open html from cgi?
Sorry if in the wrong section, just didnt know where to put.

I'm trying to do a script that will check if shares are mounted, if not mounted it will mount them and then carry on to the jukebox.

The checking and mounting part of the script is fine, i just can't figure out how to call the jukebox as it's a dynamic one.

The script layout is like

1 check mounts
2 if ok start jukebox
3 if not ok, remount then start jukebox

From what ive read i should be using something like
PHP Code:
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=http://192.168.123.100:8088/Dynamic_._1.html">'

I have tried variations on the above with no luck, can anyone confirm if this is even possable.

Thanks

Miller


My Popcorn Hour A110 Trakt.tv (TESTING)
[Image: watched-fanart.jpg]
Community Software Installer - For All Your User Apps
PchTrakt - Millers Mods Download

A-400 - Onkyo TX SR608 AV receiver, C-200, A110
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 02:23 PM
Post: #2
RE: Open html from cgi?
Journey had a cgi script that did something similar for the 100 series which would check to see if a path was mounted prior to playing a file from a jukebox.

Its not exactly the same but the concept is very similar. It was part of it play.cgi script he wrote awhile ago.

Did you have a look at that at all?

Pannasonic Plasma 50" -->HK254-->Emotiva xpa-5 & upa-2
A100 w/ 500gb HDD, A200 w/ mn100, c200 w/ 2.5" 250gb
Calm 2.1, YAMJ - Redefined 1.8a skin, Music Jukebox 8
WHS ex490 w/ 2.5tb's
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 03:55 PM
Post: #3
RE: Open html from cgi?
Hi excal,

Have had a look at play.cgi and from what i can tell he's used a command like i have tried

Code:
RETURNTO="<meta http-equiv='refresh' content='10;url=${RETURNTO}'>"

I'm begining to think that it can't be done Sad

My Popcorn Hour A110 Trakt.tv (TESTING)
[Image: watched-fanart.jpg]
Community Software Installer - For All Your User Apps
PchTrakt - Millers Mods Download

A-400 - Onkyo TX SR608 AV receiver, C-200, A110
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 04:17 PM
Post: #4
RE: Open html from cgi?
I know a few things did change from the 100 -200 that made it not work quite properly. This may be one of them.


The people to ask directly are Lordy, and Journey. Lundman and Dc11ab might have some insight too.

Pannasonic Plasma 50" -->HK254-->Emotiva xpa-5 & upa-2
A100 w/ 500gb HDD, A200 w/ mn100, c200 w/ 2.5" 250gb
Calm 2.1, YAMJ - Redefined 1.8a skin, Music Jukebox 8
WHS ex490 w/ 2.5tb's
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 04:21 PM
Post: #5
RE: Open html from cgi?
doesn't kdoske still work with the http://localhost.drives urls?
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 04:25 PM (This post was last modified: 05-06-2011 04:27 PM by jhmiller.)
Post: #6
RE: Open html from cgi?
That's the thing, i expect that that line would work if it pointed to a file but as i'm using nmtserver all html are generated as requested so i cant point it to a html file.
Does any one know what program on the C200 is used to display html, if known could i just use the program name followed by the url?

My Popcorn Hour A110 Trakt.tv (TESTING)
[Image: watched-fanart.jpg]
Community Software Installer - For All Your User Apps
PchTrakt - Millers Mods Download

A-400 - Onkyo TX SR608 AV receiver, C-200, A110
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 05:21 PM
Post: #7
RE: Open html from cgi?
I've seen this :
http://www.networkedmediatank.com/showth...#pid360353

maybe this command works, I didn't try :
echo /location/page.html > /tmp/gaya_bc
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to Grael for this post
05-06-2011, 07:07 PM
Post: #8
RE: Open html from cgi?
I think Grael is spot on; piping a html page to /tmp/gaya_bc should output it on TV screen.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to dc11ab for this post
05-06-2011, 09:03 PM
Post: #9
RE: Open html from cgi?
Thanks Guys Big Grin

I have not tried from the script but can confirm that it works via telnet

Code:
echo http://192.168.123.100:8088/Dynamic_._1.html > /tmp/gaya_bc

Thanks again guys

My Popcorn Hour A110 Trakt.tv (TESTING)
[Image: watched-fanart.jpg]
Community Software Installer - For All Your User Apps
PchTrakt - Millers Mods Download

A-400 - Onkyo TX SR608 AV receiver, C-200, A110
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 09:13 PM (This post was last modified: 05-06-2011 09:14 PM by accident.)
Post: #10
RE: Open html from cgi?
why not just make an html file that redirects to nmtserver and use the localhost.drives path to point to it?

Or even better, nmtserver should be able to mount shares as needed from nmtserver...
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 10:10 PM
Post: #11
RE: Open html from cgi?
I am no coder lol, if html can also have shell code inside i would not have a clue where to begin. I just learn what i can from seeing others code and a little knowale of basic from back in the day. I could do the check commands as that was just If then stuff and formatting was just a case of google it, you guys would laugh if i showed it to you but hopfuly it will do what i want.

The wife kepted moaning at me everytime she wanted to watch somthing and the share was not mounted, so now when she starts the jukebox it will now check and mount (if needed) all the shares and then display the jukebox all with the same 1 button press as before (she dont like tech)

Are you saying nmtserver has this now or a feature that could be added?

My Popcorn Hour A110 Trakt.tv (TESTING)
[Image: watched-fanart.jpg]
Community Software Installer - For All Your User Apps
PchTrakt - Millers Mods Download

A-400 - Onkyo TX SR608 AV receiver, C-200, A110
Find all posts by this user
Add Thank You Quote this message in a reply
05-06-2011, 10:38 PM
Post: #12
RE: Open html from cgi?
I couldn't tell you what nmtserver can and can't do but considering its an app running all the time, it should be very easy for it to mount the share for you before it tries to play anything. Also considering I haven't seen anyone ask this before, perhaps there a way to do what your trying too already. I would ask in the nmtserver thread how to have shares mount.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to accident for this post
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [400] how to convert scripts from c200 (html+php) to a400 (javascript or bash or ???) ? dmhwsm 0 447 02-10-2013 05:39 PM
Last Post: dmhwsm
  [200] Need help / guide to open NMT web interface on MAC borgmester@tjekket.dk 6 1,346 04-25-2012 08:03 PM
Last Post: marmi
  [200] Could not open any mkv nor divx Komerad 4 1,851 12-22-2011 06:42 PM
Last Post: Komerad
  [200] how to add CR or BR/ in html page jluc2808 2 1,343 09-25-2011 06:29 PM
Last Post: jluc2808
  [200] php/html play files Arie B 5 2,359 03-31-2011 10:35 PM
Last Post: Arie B
  [200] [Apps] Run CGI script from flash zofer 5 2,492 03-24-2011 11:04 AM
Last Post: zofer
  [200] Passing switches via HTML to a script nuke12 10 2,004 12-01-2010 11:16 PM
Last Post: nuke12
  [200] launch code from an html page AchilleTalon 3 1,139 12-01-2010 05:36 PM
Last Post: AchilleTalon
  [200] Edit index.html Stevenr 0 945 11-20-2010 05:21 PM
Last Post: Stevenr
Information [200] start.cgi (index) replacement zoef 15 4,153 09-30-2010 11:21 AM
Last Post: cheaper_popcorn

Forum Jump: