Nth thumbnail generation using PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mayurss786
    replied
    ok bro i m waiting

    Leave a comment:


  • Pflash
    replied
    ok.soon i will post it.

    Leave a comment:


  • mayurss786
    replied
    hi thnx so much can you post here .thm and .sis file thumbnail script like this which you have posted...

    Leave a comment:


  • mayurss786
    replied
    Originally posted by Pflash View Post
    ok i will try to add it.
    thnx bro ....

    Leave a comment:


  • arvindverma1992
    replied
    Originally posted by Pflash View Post
    This script will generate thumbnail of nokia theme files (.nth) using PHP.

    These theme files are simple compressed archive with theme info enclosed in a xml file named 'theme_descriptor.xml'

    Follow comment to get an idea of what the script does on each step.
    PHP Code:
    <?php
     
    /*
     
    NTH THUMBNAIL GENERATOR ( generate thumbnail of nth files using PHP )
     
    POSTED AT PHPADDA.IN
     
    Usage : 
     
    => Save this file as nth.php 
     
    => Call it in your html as <img src='nth.php?file=xyz.nth' />
     
    */
     
    require_once"tdesk/class.pclzip.php";
     
    // Get it at www.phpconcept.net/pclzip.
     
    if(!isset($_GET['file']) || !is_file($_GET['file']))exit('Feed me a nth file');
     
    // Add more security checks like extension/filesize check.
     
    $nth = new PclZip($_GET['file']);
     
    // Create a new instance of Pclzip class.
     
    $content $nth->extract(PCLZIP_OPT_BY_NAME,'theme_descriptor.xml',PCLZIP_OPT_EXTRACT_AS_STRING);
     
    // Extract theme_descriptor_xml file as string.
     
    $xml simplexml_load_string($content['0']['content']);
     
    // Load the sting in a simple xml object.
     
    $src trim($xml->wallpaper['src']) or $src trim($xml->wallpaper['main_display_graphics']);
     
    // Get main theme background image's name.
     
    $img $nth->extract(PCLZIP_OPT_BY_NAME,$src,PCLZIP_OPT_EXTRACT_AS_STRING);
     
    // Extract the main background image as string.
     
    $img $img['0']['content'];
     
    // Obtain the string.
     
    $img imagecreatefromstring($img);
     
    // Create an image from that string.
     
    header('Content-type: image/jpeg');
     
    // Send a header to the browser saying that the output is of image/jpeg type.
     
    imagejpeg($img);
     
    // Output the image to the browser.
     
    imagedestroy($img);
     
    // Clean and free up resources.
     
    ?>
    hit thanks button
    hey bro in this script u have to add pclzip... u can download it here....

    website-PhpConcept

    download it here- PclZip Downloads

    thanx...

    Leave a comment:


  • Pflash
    replied
    ok i will try to add it.

    Leave a comment:


  • mayurss786
    replied
    can you add this in sea 8.1 mod thnx if you done.

    Leave a comment:


  • Pflash
    started a topic Nth thumbnail generation using PHP

    Nth thumbnail generation using PHP

    This script will generate thumbnail of nokia theme files (.nth) using PHP.

    These theme files are simple compressed archive with theme info enclosed in a xml file named 'theme_descriptor.xml'

    Follow comment to get an idea of what the script does on each step.
    PHP Code:
    <?php
     
    /*
     
    NTH THUMBNAIL GENERATOR ( generate thumbnail of nth files using PHP )
     
    POSTED AT PHPADDA.IN
     
    Usage : 
     
    => Save this file as nth.php 
     
    => Call it in your html as <img src='nth.php?file=xyz.nth' />
     
    */
     
    require_once"tdesk/class.pclzip.php";
     
    // Get it at www.phpconcept.net/pclzip.
     
    if(!isset($_GET['file']) || !is_file($_GET['file']))exit('Feed me a nth file');
     
    // Add more security checks like extension/filesize check.
     
    $nth = new PclZip($_GET['file']);
     
    // Create a new instance of Pclzip class.
     
    $content $nth->extract(PCLZIP_OPT_BY_NAME,'theme_descriptor.xml',PCLZIP_OPT_EXTRACT_AS_STRING);
     
    // Extract theme_descriptor_xml file as string.
     
    $xml simplexml_load_string($content['0']['content']);
     
    // Load the sting in a simple xml object.
     
    $src trim($xml->wallpaper['src']) or $src trim($xml->wallpaper['main_display_graphics']);
     
    // Get main theme background image's name.
     
    $img $nth->extract(PCLZIP_OPT_BY_NAME,$src,PCLZIP_OPT_EXTRACT_AS_STRING);
     
    // Extract the main background image as string.
     
    $img $img['0']['content'];
     
    // Obtain the string.
     
    $img imagecreatefromstring($img);
     
    // Create an image from that string.
     
    header('Content-type: image/jpeg');
     
    // Send a header to the browser saying that the output is of image/jpeg type.
     
    imagejpeg($img);
     
    // Output the image to the browser.
     
    imagedestroy($img);
     
    // Clean and free up resources.
     
    ?>
    hit thanks button
Working...
X