Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: wap & php

  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    257
    Thanks
    8
    Thanked 0 Times in 0 Posts

    wap & php

    Hello,

    I have a page made in php but I have a directory with some files. So, I want to give access to my users to that files for download to his/her wap cellphones. My idea is the following:

    I want to put in the index.wml a form that consists in one text box and one submit button, so the users need to enter a name with the name of the file with the extension and if the file exists the file begin download other way an alert is showing with echo php tag.

    The files are stored in a directory called "sms-wap".

    Regards

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    PHP Code:
    if (!file_exists($dir/$filename))
    { echo 
    "File does not exist"; }
    else {
    header("Location:http://$dir/$filename");

    ofcourse you should have an if statement to see if data has been submitted

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Posts
    257
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I know how to implement using php I asked about in format wml.

    Regards

  • #4
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    try setting your server up 2 parse wap pages as PHP pages, then whack some php in your wap pages, all is well?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •