[PHP] Image resizing...
Hi All I've been working on finishing a project SGML2IMAGE and I am sort of having trouble with resizing of images. I am trying to just use the GD library so when I distro the package it will not need any other things installed to be used. Now I am using... imagecreatetruecolor (); imagecreatefrom___ (); imagecopyresampled (); image___ (); But the thumbnails look blurry for any image less than 50% of the original image created by the PHP SGML parser. So my question seeing I am not very good with the GD library. Am I using the best functions to do the resize or should I be using some other image function(s) that may give better results! To give you a idea of what I am doing see the demo running on my note book http://24.218.192.217/capture.php Thanks sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php5--com terribly wrong ?
If you need this functionality then you should go back to PHP 4 the version that worked for you. I also have problems with this and winmgmts object. some classes work others don't, most times it's a VARIANT type problems. I know Wez is really busy but if you keep checking the snap shots you will see he is fixing things as they come in. A good idea is to check bugs.php.net before upgrading as it will help determine if a update is a wise decision! Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] trying to understand PHP unpack();
Hi In Perl I have a part of a script # cut.. my $line = '!v2005*08|05+09?04^19*!'; my ( $s_code, $year, $month, $day, $hour, $minute, $second, $e_code ) = unpack ( x1 A1 A4 x1 A2 x1 A2 x1 A2 x1 A2 x1 A2 A1, $line ); print $s_code . \n; print $year . \n; print $month . \n; print $day . \n; print $hour . \n; print $minute . \n; print $second . \n; print $e_code . \n; sleep 10; # so we can see it in the command window In Perl this runs without trouble, in PHP it does not seem to work the same way. Can someone explain to me what I need to do differently to allow PHP to understand what I am trying to do! ? my $line = '!v2005*08|05+09?04^19*!'; $output = unpack ( x1 A1 A4 x1 A2 x1 A2 x1 A2 x1 A2 x1 A2 A1, $line ); print_r ( $output ); ? Thanks SD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] hide bbcode for spell checking!
This is what it needs to do! The first tag that is found will set where the parser will insert '!-- / sc' before that tag. Any bbcode tags that are in the current tag will be skipped over until the parser finds the end of the current bbcode tag it is working on. Once it finds the end of the current tag it will insert 'sc / --' after the end of the current tag. It will continue doing this until no tags are left to be parsed in the string! My script is below My question... Is there a better way to do this? // script! ? $res = array ( '!-- / sc', 'sc / --', '', '' ); $str = [quote=tinyman,Jul 29 2005, 11:27 PM] Visit my site www.site.com . It provide Email Service(4gb), Free Forum, Free File Hosting, Free Webhosting and Free Blog hosting. [b][right]149013[/right][/b] [/[EMAIL PROTECTED]/b][/email][code]? echo 'hi'; ?[/code] jp ; echo bbcode_phase ( $str, $res[0], $res[1] ); function bbcode_phase ( $text, $es, $ee ) { $bb = array ( 'q' = '5|quote', 'r' = '5|right', 'e' = '5|email', 'h' = '4|html', 'p' = '3|php', 'f' = '4|font', 'l' = array ( '4|list', '4|left' ), 's' = '4|size', 'b' = array ( '2|b]|b', '5|bible' ), 'u' = array ( '2|u]|u', '3|url' ), 'c' = array ( '4|code', '5|color', '6|center' ), 'i' = array ( '2|i]|i', '3|img', '6|indent' ) ); $a = ''; // the output string holder $b = array (); // the current tag info array $c = 0; // where we are in the substr $d = strtolower ( $text ); // lower case the string while ( ( $e = strpos ( $d, '[' ) ) !== false ) { $a .= substr ( $text, $c, $e ); $c += $e; /* if we have a current tag do this */ if ( ! empty ( $b ) ) { /* if we match the end of the current tag process it */ if ( substr ( $d, ( $e + 2 ), $b[0] ) == $b[1] ) { if ( isset ( $b[2] ) ) // for bbcode tags ([b], [i] ... ) { $a .= '[/' . strtoupper ( $b[2] ) . ']' . $ee; $c += ( $b[0] + 2 ); $d = substr ( $d, ( $e + $b[0] + 2 ) ); } else { $a .= '[/' . strtoupper ( $b[1] ) . ']' . $ee; $c += ( $b[0] + 3 ); $d = substr ( $d, ( $e + $b[0] + 3 ) ); } $b = array (); } else /* not a current tag substr 1 character forward */ { $a .= substr ( $text, $c, 1 ); $d = substr ( $d, ( $e + 1 ) ); $c += 1; } } else /* no current tag, find one if it is there */ { $f = false; $g = substr ( $d, ( $e + 1 ), 1 ); if ( isset ( $bb[$g] ) ) { /* * some tags have more than 1 value so they * are arrays other are just string values. */ if ( is_array ( $bb[$g] ) ) { for ( $i = 0; $i sizeof ( $bb[$g] ); $i++ ) { $b = explode ( '|', $bb[$g][$i] ); if ( substr ( $d, ( $e + 1 ), $b[0] ) == $b[1] ) { $f = true; break; } } } else { $b = explode ( '|', $bb[$g] ); if ( substr ( $d, ( $e + 1 ), $b[0] ) == $b[1] ) { $f = true; } } } /* we have found a starting tag process it */ if ( $f ) { if ( isset ( $b[2] ) ) // for bbcode tags ([b], [i] ... ) { $a .= $es . '[' . strtoupper ( $b[2] ); $c += $b[0]; $d = substr ( $d, ( $e + $b[0] ) ); } else { $a .= $es . '[' . strtoupper ( $b[1] ); $c += ( $b[0] + 1 ); $d = substr ( $d, ( $e + 1 + $b[0] ) ); } } else /* not a good starting tag substr 1 character forward */ { $a .= substr ( $text, $c, 1 ); $b = array (); $d = substr ( $d, ( $e + 1 ) ); $c += 1; } } } /* * if the string has more characters after the last * closing tag put back what is left... * */ if ( ! empty ( $d ) ) { $a .= substr ( $text, $c ); } return ( $a ); } ? thanks Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php://input (multipart support)
Hi Will HTTP_RAW_POST_DATA (php://input) multipart ever be supported? I have asked this question a few times and was told it would not happen until around php 4.3 release. Although I do appreciate the PHP teams added support for all the other (PUT/POST) methods when dealing with the input stream, I think multipart support is also greatly needed. Thanks Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP error on form
Hi First some of your $_POST array variables are written like $POST['var'], you need to change them to $_POST['var']. Then because you are not using the dot operator in your string variables and you are using a associative array you must enclose the array variable in {$arr['var']} tags! // enclose with {...} $msg .=Senders Name: {$_POST['senders_name']}\n; $msg .=Senders E-MAIL: {$_POST['senders_email']}\n; $msg .=Senders Name: {$_POST['message']}\n\n; $mailheaders .=Reply-To: {$_POST['sender_email']}\n; // or use the dot operator $msg .=Senders Name: . $_POST['senders_name'] . \n; $msg .=Senders E-MAIL: . $_POST['senders_email'] . \n; $msg .=Senders Name: . $_POST['message'] . \n\n; $mailheaders .=Reply-To: . $_POST['sender_email'] . \n; Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How Can I send mail in php in HTML format?
Also Richard Heyes has a updated his class to work with PHP 5, you can also get updated version of the PHP 4 class! http://www.phpguru.org/static/htmlMimeMail5.html Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PDFs are blank in e-mail sent via PHP
Hi Without seeing the clients resulting email it is very hard to see what is wrong. It could be line endings or a host of other things. Maintaining RFC 2049 standards is important because even though your server might support one method the client may not support what you are using! RFC 2049 and RFC822 state... (2) Many systems may elect to represent and store text data using local newline conventions. Local newline conventions may not match the RFC822 CRLF convention -- systems are known that use plain CR, plain LF, CRLF, or counted records. The result is that isolated CR and LF characters are not well tolerated in general; they may be lost or converted to delimiters on some systems, and hence must not be relied on. Always use CRLF in any mail header or body entity following RFC2049 standards Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] unsuscribe
How cant i unsuscribe from this list? Thanks Como puedo darme de baja? Gracias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php