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 5 of 5

Thread: Desktop

  1. #1
    Regular Coder
    Join Date
    Sep 2004
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Desktop

    I've seen this done before but I don't know how to do it.

    I want to have a page that shows my desktop and refreshes every 30 seconds.

    thanks,
    metsuo

  • #2
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    PHP Code:
    <html>
    <head>
    <meta http-equiv="refresh" content="30">
    </head>
    <body>

    <?php
    $scandir 
    scandir('/path/to/desktop/');
    foreach (
    $scandir as $value)
    {
        echo 
    $value '<br>';
    }
    ?>

    </body>
    </html>

  • #3
    Regular Coder
    Join Date
    Sep 2004
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks but scandir is an undefined function

  • #4
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    Quote Originally Posted by shinko_metsuo
    Thanks but scandir is an undefined function
    then do either of the following:
    1. upgrade to PHP5
    2. use opendir and readdir

  • #5
    Regular Coder
    Join Date
    Sep 2004
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    installing PHP5 on a unix system how fun :P

    opendir works but I get this

    Warning: Invalid argument supplied for foreach() in /var/www/html/desktop.php on line 9


  •  

    Posting Permissions

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