Jump to content

zq29

Staff Alumni
  • Posts

    2,752
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by zq29

  1. [!--quoteo(post=385374:date=Jun 18 2006, 07:39 PM:name=michaellunsford)--][div class=\'quotetop\']QUOTE(michaellunsford @ Jun 18 2006, 07:39 PM) [snapback]385374[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Instead of imagecreate, you might try using imagecreatetruecolor.

    Now, I run macintosh and am noticing that images are significantly desaturated once they've been run through PHP. So much so that you don't even have to see them side by side to see how dramatic the difference.

    However, the same side by side comparison on a standard Windows PC reveals no difference at all. The original, beautifully saturated image is rendered on a Windows PC the same way php is rendering the other image.

    Here is my side by side comparison. Side by side on the mac -- night and day. Side by side on my test PC, they are identical.
    [a href=\"http://www.virtual-showcase.net/proofs/gulfsouth/test.html\" target=\"_blank\"]http://www.virtual-showcase.net/proofs/gulfsouth/test.html[/a]
    [/quote]
    Surely that only matters if the code is being [i]served[/i] from a Mac though right? I just viewed your link on both my XP Pro machine, and on my Mac and results were identical.
  2. I'm not sure if I fully understand what you are asking. Do you want to know how to get people to your site?

    I'd suggest actually creating the site first, and then asking that question in a SEO or marketing forum. You can't write some code that attracts surfers to your site...
  3. I have dynamically created playlists before, different playlist formats are structured in different ways. What I did was create a playlist in WMP and opened it with a text editor to see how it was formatted, it was then easy to create with PHPs file functions, and then just save it with the correct extension.
  4. [!--quoteo(post=384565:date=Jun 16 2006, 03:25 PM:name=wardo)--][div class=\'quotetop\']QUOTE(wardo @ Jun 16 2006, 03:25 PM) [snapback]384565[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    I've tried using glob() but I'm doing something wrong. How do I integrate it into my original code?
    [/quote]
    [code]<?php
    $files = array();
    foreach (glob("departments/policiesnew/docs/policies/atoz/*.*") as $filename) {
        $files[] .= $filename;
    }
    sort($files);
    foreach($files as $file) {
        echo $file."<br/>";
    }
    ?>[/code]
  5. You could try our Miscellaneous forum, you can chat about anything in there :)

    With regards to the X in the ATI X-Series cards, I believe it denotes that the GPU has native PCI-Express support. Dont know much about ATI's onboard chipsets so can't offer much help there, although I know that the m200 allows you to dedicate some of the system memory for graphics, ontop of its 128MiB dedicated memory, does the x200 do that?
  6. Have you tried glob() on your machine? If it doesn't sort them A-Z, you could try this:
    [code]<?php
    $files = array();
    foreach (glob("*.*") as $filename) {
        $files[] .= $filename;
    }
    sort($files);
    foreach($files as $file) {
        echo $file."<br/>";
    }
    ?>[/code]
  7. [!--quoteo(post=384516:date=Jun 16 2006, 11:38 AM:name=bilis_money)--][div class=\'quotetop\']QUOTE(bilis_money @ Jun 16 2006, 11:38 AM) [snapback]384516[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    so you mean SA there is no currently specific functions with php to do this?
    [/quote]
    Correct.

    But to elaborate on my previous statement, with regards to a GeoIP service, I think you'd have to pay for a service that gives you the level of detail you require. I have found free services that can locate the originating country of an IP, but broken down to a region, or city, I guess you would have to pay.
  8. [a href=\"http://uk.php.net/manual/en/features.file-upload.php\" target=\"_blank\"]PHP Manual: Chapter 38. Handling file uploads[/a]. That is definitly worth the read. You can do basic error checking with the data provided by the $_FILES array, its worthwhile playing with the contents of $_FILES['userfile']['error'] too.
  9. Ok, you could take the contents of your form input, and run it through explode(" ",$input); which will create an array, each key holding one word. You can then run this array through array_unique() to remove any duplicate values, leaving an array containing only unique words. If you need it back in a string, you can run the array through implode(" ",$array), or to count the unique words, run the array through count().

    Oh, if you needed each unique word on a new line, you could just run the array through a foreach() statement.
  10. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]is there a way to convert an array into a string and simply echo it?[/quote] You could use implode()

    [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]What I am having trouble figuring out is how to remove the array keys.[/quote] You can use unset() - unset($array[4],$array[8],$array[9])
  11. Moved to our 3rd Party PHP Scripts forum. Please be advised that the PHP Help forum is for requesting help with scripts that [i]you[/i] are writing. If you fair to get a response to your question here, it might be worth contacting the author, or looking for a forum on the site that you downloaded the script from.
  12. [!--quoteo(post=383259:date=Jun 13 2006, 02:36 PM:name=Mash)--][div class=\'quotetop\']QUOTE(Mash @ Jun 13 2006, 02:36 PM) [snapback]383259[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    How can I create a thumbnail for animated image with animated effect?
    [/quote]
    This is possible with [a href=\"http://www.imagemagick.org\" target=\"_blank\"]ImageMagick[/a] I believe.
  13. ZeBadger from the php.net comments pages wrote the following function to check if a gif is animated or not. I have not tested it, but from looking at the code it is to be executed on a *NIX based machine, although it could be adapted to work with a Windows one, or even make it OS independant.

    [code]<?php
    function is_ani($filename){
        $filecontents=file_get_contents($filename);
        $str_loc=0;
        $count=0;
        while ($count < 2) { # There is no point in continuing after we find a 2nd frame
            $where1=strpos($filecontents,"\x00\x21\xF9\x04",$str_loc);
            if ($where1 === FALSE) {
                break;
            } else {
                $str_loc=$where1+1;
                $where2=strpos($filecontents,"\x00\x2C",$str_loc);
                if ($where2 === FALSE) {
                    break;
                } else {
                    if ($where1+8 == $where2) {
                        $count++;
                    }
                    $str_loc=$where2+1;
                }
            }
        }
        if ($count > 1) {
            return(true);
        } else {
            return(false);
        }
    }

    exec("ls *gif" ,$allfiles)
    foreach ($allfiles as $thisfile) {
        if (is_ani($thisfile)) {
            echo "$thisfile is animated<BR>\n";
        } else {
            echo "$thisfile is NOT animated<BR>\n";
        }
    }
    ?>[/code]
    I dropped the semi-colon from the exec() line as it was causing issues posting.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.