SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
Thread: WML Question
-
Feb 7, 2001, 20:36 #1
- Join Date
- Dec 2000
- Location
- orbis terrarum
- Posts
- 1,523
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Does anyone know how to integrate a "Fact of the Day" script into a WML page? I want to keep the content somewhat dynamic but I don't know how to display a different message everyday.
-
Feb 7, 2001, 23:05 #2
- Join Date
- Feb 2000
- Location
- District of Columbia
- Posts
- 373
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
dominique,
I am not quite sure how to do that, but try looking on (around) www.wap.com
They have goog resources and tutorials, I am learning this myself right now
HTH
-
Feb 8, 2001, 07:54 #3
-
Feb 8, 2001, 08:32 #4
- Join Date
- Aug 1999
- Location
- Pittsburgh, PA, USA
- Posts
- 3,910
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I cannot say for sure, but I don't think WMLScript would do the trick - it'd be a pain, for sure. WMLScript can be thought of as JavaScript's wireless counterpart.
Shin Ma, however, is correct: you'll need to use some sort of server-side language, and have it spit out WML code - it's not too tough.
The only trick to it is to use something like, perhaps, .htaccess to have your server parse .wml files as .php/.asp (depending on what you use). This allows the PHP/ASP code inside to be parsed, but still allows wireless devices to use it with it's .wml extension.
For PHP, there is a command you'll need to enter to send to the HTTP header though, I believe. If you need that line, let me know.
It's not too tricky overall: anything you can spit out with PHP/ASP, you can post on a WML page with a little work. You can essentially have a database-driven site in either language, and make the same articles/tutorials/reviews/etc available to wireless users, pulled right out of the database.
-
Feb 9, 2001, 10:41 #5
- Join Date
- Dec 2000
- Location
- orbis terrarum
- Posts
- 1,523
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks guys. I don't know any PHP, is it similarly easy to implement a PHP script as it is to implement a Perl script?
Right know I'm hoping that I can just do some minor alterations to some existing script available for free. I found the special code to place at the top of the script on www.wap.com.
-
Feb 9, 2001, 10:46 #6
- Join Date
- Aug 1999
- Location
- Pittsburgh, PA, USA
- Posts
- 3,910
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It shouldn't be too difficult, assuming you can get Perl code to parse in a .wml file (there might be a different way, I just don't know of any right now). Perl and PHP are very similar.
-
Feb 9, 2001, 16:40 #7
- Join Date
- Sep 2000
- Location
- Corsica
- Posts
- 552
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You can also make a whole ASP page with WML tags instead of HTML tags, and declare the MIME-type WML in the ASP headers.
If you plan on making this your front page, either work this out in .htaccess or set a little redirection page (you'd prefer .htaccess, but some hosts won't allow you to modify this file).
-
Feb 12, 2001, 04:12 #8
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmm..
If you know PERl, you know 50% php.
its so similar.
if i'm ocrrect, php has built insupport for wml? if so, you cna take this query to the PHP forum and get the experts there.
i have a current php script which randomly display certain text form a file.
i also have a javascript corresponding file.
do you want them?"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 12, 2001, 08:48 #9
- Join Date
- Aug 1999
- Location
- Pittsburgh, PA, USA
- Posts
- 3,910
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
lynlimz: That would depend on what you mean by "built-in support" - PHP can spit out WML code without much of a problem - you just need to have your server parse .wml pages for PHP code, and add a line of code to specify in the Document Headers that the file is indeed a WML file.
So, basically, I'd say PHP supports flexibility with the headers, and will let you configure your server to parse other file extensions as PHP files - which allows you to do many things, one of which is created a WML page dynamically.
-
Feb 12, 2001, 16:38 #10
- Join Date
- Dec 2000
- Location
- orbis terrarum
- Posts
- 1,523
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by lynlimz
i have a current php script which randomly display certain text form a file.
i also have a javascript corresponding file.
do you want them?
As for the javascript file, I was under the impression Wap phones don't support javascript. Am I wrong?
-
Feb 12, 2001, 17:09 #11
- Join Date
- Aug 1999
- Location
- Pittsburgh, PA, USA
- Posts
- 3,910
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No, you are correct, I'm 99% sure WAP phones do not support JavaScript - to achieve JavaScript-esque effects, you'd have to use WMLScript. It is to WML what JavaScript is to HTML.
Bookmarks