Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8021575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:01:38+00:00 2026-06-04T22:01:38+00:00

i have a program to update some file from my site and i do

  • 0

i have a program to update some file from my site and i do all work but i have a problem in
update.php script

my application side update cod is(in C#):

    public string[] NeededFiles = { "teknomw3.dll" };
    public string HomePageUrl = "http://se7enclan.ir";
    public string NewsUrl = "http://se7enclan.ir/news";
    public string DownloadUrl = "http://se7enclan.ir/";
    public string UpdateList = "http://se7enclan.ir/update.php?action=list";
    public string UpdateBaseUrl = "http://se7enclan.ir/Update/";

and my update directory on my site as you see(all files is here.):

http://se7enclan.ir/Update/

so what script must be in update.php that i can use this: “update.php?action=list”

this update.php script must work like this site:
http://mw3luncher.netai.net/update.php?action=list

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:01:40+00:00Added an answer on June 4, 2026 at 10:01 pm

    I understand your problem man. Here is a solution:

    <?PHP
      function getFileList($dir)
      {
        // array to hold return value
        $retval = array();
    
        // add trailing slash if missing
        if(substr($dir, -1) != "/") $dir .= "/";
    
        // open pointer to directory and read list of files
        $d = @dir($dir) or die("getFileList: Failed opening directory $dir for reading");
        while(false !== ($entry = $d->read())) {
          // skip hidden files
          if($entry[0] == ".") continue;
          if(is_dir("$dir$entry")) {
            $retval[] = array(
              "name" => "$dir$entry/",
              "type" => filetype("$dir$entry"),
              "size" => 0,
              "lastmod" => filemtime("$dir$entry")
            );
          } elseif(is_readable("$dir$entry")) {
           $retval[] = array(
              "name" => "$dir$entry",
              "type" => mime_content_type("$dir$entry"),
              "size" => filesize("$dir$entry"),
              "lastmod" => filemtime("$dir$entry")
            );
          }
       }
        $d->close();
    
        return $retval;
      }
    ?>
    

    You can use this function as follows:

    <?PHP
      // examples for scanning the current directory
      $dirlist = getFileList(".");
      $dirlist = getFileList("./");
    ?>
    

    And to output the results to an HTML page we just loop through the returned array:

    <?PHP
      // output file list as HTML table
      echo "<table border="1">\n";
      echo "<tr><th>Name</th><th>Type</th><th>Size</th><th>Last Mod.</th></tr>\n";
      foreach($dirlist as $file) {
        echo "<tr>\n";
        echo "<td>{$file['name']}</td>\n";
        echo "<td>{$file['type']}</td>\n";
        echo "<td>{$file['size']}</td>\n";
        echo "<td>",date('r', $file['lastmod']),"</td>\n";
        echo "</tr>\n";
      }
      echo "</table>\n\n";
    ?>
    

    Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL update statement I am running from inside a PHP program.
I have an update program that is completely independent of my main application. I
I am writing some code to update an application by fetching new dlls from
I have program that sends a file to a printer using 'lpr' command. I
I am trying to update some local access databases from a web database. When
I have a simple Java program that reads in a text file, splits it
I have a header-file, the COM interface. I have created a small win32 program
I have a Flex application which references a separate MXML file as a template
I'm using a Java program to POST some XML data from a remote client
(Problem solved, please see the updates) I have some files that have incorrect filenames

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.