Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can REXX be used with HTML or PHP

Status
Not open for further replies.

Jlucia

Programmer
Sep 21, 2000
6
0
0
US
Hello,

I just was wondering if anyone knows if REXX programming can be used within HTML of PHP code. I am looking to do this on a webpage. I want to use REXX to break up a large text document containing information and then display it on an intranet using HTML or PHP. Any input on this would be appreciated......
 
Hello Jlucia,

yes it is possible. I do my homepage with REXX ( I use a selfwritten script, but there are many REXX Tools for HTML Formatting on the web, like ppwizard.

If you need more information, tell me what you want to do.

Greetings

Carsten
 
Hi Jlucia ,
in case u have cleared ur doubt , then please let me know ur findings.
I aslo, want to write REXX+HTML code.
byee
 
I'm wanting to use Object REXX server-side on a Microsoft IIS server to produce HTML output. I have it working client-side, but I can't expect everyone to have Object REXX installed. Can someone point me in the right direction to get it working without having to have the clients install anything?

Thanks, -Mark
MarkHarsen@smsu.edu
 
Well, nevermind. I answered my own question, but since I asked, I'll answer it here too.

First, just install Object Rexx on your IIS server machine as normal. Create an ASP document that defines the language used by coding the following as the first line in the file:

<%@ Language="Object Rexx"%>

Then, just enter and exit "asp" mode as normal with the <% and %> tags, but write Object REXX code between them. Output isn't done with "say" or "Document~writeln" but instead with "response~write(Data)".

Write me for more information if you like.

Thanks, -Mark
MarkHarsen@smsu.edu


Here's a sample program supplied by IBM but modified for server-side (instead of client-side) scripting:

<%@ Language="Object Rexx"%>
<%
/**********************/
/* 99 bottles of beer */
/**********************/

blue = "#3060c8" -- our blue color
yellow = "#fff000" -- our yellow color
red = "ffffff" -- a "dynamic" color...

/* write TABLE tag to HTML file */
response~write('<TABLE BORDER="0">')

/* main loop */
do i = 99 to 1 by -1
if i > 1 then plural = 's';
else plural = '';

response~write('<TR><TD BGCOLOR="#'red'">' i 'bottle'plural 'of ',
'beer on the wall,' i 'bottle'plural 'of beer<BR>')
response~write('Take one down, pass it around!</TD></TR>')

/* fade from red to white (decrease values for green and blue) */
red = (red~x2d - '000202'~x2d)~d2x
end

/* beer is out! */
response~write('<TR><TD BGCOLOR="'blue'"><FONT COLOR="'yellow'">No more ',
'bottles of beer on the wall, no more bottles of beer<BR>')
response~write('Go to the store and buy some more!</FONT></TD></TR>')

/* end table */
response~write('</TABLE>')
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top