Results 1 to 5 of 5

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.

Thread: Date key and MD5Sum for installer packages/sources

  1. #1
    Default Date key and MD5Sum for installer packages/sources

    ok, so I made a php file that gives you the 64bit date key needed for installer sources.

    when you add this key to your package it will show up under the recent packages catagory.

    also, it will generate the md5sum needed for the hash key that will be required soon.

    I've never used php b4 today and have limited html experience, so if the code sucks or is messy sorry.

    The cant figure out 2 things.
    1: you need to define the absolute directory of the files you want the info for. This is stupid, should php know what directory its running from? look at the bottom of the example and you'll see "D:/...". any way to get rid of the D:/??? as I used getcwd.

    2: I dont care to hash or get the date key for the "." and ".." entries. any way to skip that?

    Here is the php code. Put it on your server, define the directory, and run it! Any mods to it our recommended as I am a php noob!
     <TITLE>Create date codes from files</TITLE>
     = "/inetpub/vhosts/";
    // = getcwd() . "n";
    // Open a known directory, and proceed to read its contents
    if (is_dir()) {
        if ( = opendir()) {
            while (( = readdir()) !== false) {
                //echo "filename:  : filetime: " . fileatime( . ) . "n";
                echo "filename: <b></b>";
                echo "<br />";
                echo "&lt;key>date&lt;/key>";
                echo "<br />";
                echo "&lt;string>" . fileatime( . ) . "&lt;/string>";
                echo "<br />";
                echo "&lt;key>hash&lt;/key>";
                echo "<br />";
                echo "&lt;string>" . md5_file() . "&lt;/string>";
                echo "<br /><br />";
    //echo getcwd() . "n";
    echo  = (substr(PHP_OS, 0, 3) == 'WIN') ? strtolower(getcwd()) : getcwd();

  2. #2
    anyone find this usefull or did I post this in the wrong area?

  3. #3
    Default I am a nood also
    Can you zip up your loop.php file and link it? I seem to get a line error on line 6 and I am not sure if my copy past of the code is the issue.

    Thank you

  4. #4

  5. #5
    This is not rocket science. To get the checksum and date keys you can use the shell:

    MD5: md5 -q /Path/To/File
    Time: date +%s
    Come visit AlohaSoft

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