+ Reply
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

is a discussion within the

3rd Party Apps Requests

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
EXAMPLE: http://ride4.org/installer/zips/loop.php 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
...
  1. #1
    iPhone? More like MyPhone shaiss's Avatar
    Join Date
    Sep 2007
    Posts
    261
    Thanks
    6
    Thanked 34 Times in 22 Posts

    Default Date key and MD5Sum for installer packages/sources
    EXAMPLE: http://ride4.org/installer/zips/loop.php

    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!
    Code:
    <HEAD>
     <TITLE>Create date codes from files</TITLE>
    </HEAD>
    <BODY>
    <?php
     = "/inetpub/vhosts/ride4.org/httpdocs/installer/zips/";
    // = 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();
    ?>
    </BODY>
    </HTML>

  2. #2
    iPhone? More like MyPhone shaiss's Avatar
    Join Date
    Sep 2007
    Posts
    261
    Thanks
    6
    Thanked 34 Times in 22 Posts

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

  3. #3
    What's Jailbreak?
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    iPhone? More like MyPhone shaiss's Avatar
    Join Date
    Sep 2007
    Posts
    261
    Thanks
    6
    Thanked 34 Times in 22 Posts


  5. #5
    Theme Creator armadillo's Avatar
    Join Date
    Jul 2007
    Posts
    1,310
    Thanks
    0
    Thanked 591 Times in 365 Posts

    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