Scale down animated GIF with PHP GD
Is it possible to scale down a animated GIF with PHP GD so that it's still animated? If so, how? ...
Is it possible to scale down a animated GIF with PHP GD so that it's still animated? If so, how? ...
I'm trying to upload an ics file to my site. It was exported from iCal on Mac OSX. I thought that ics files had a mime type of text/calendar, but for some reason this file seems to be of type Application/octet-stream. This makes the upload fail my verification tests. Anyone have any ideas why the type isn't what I expect?! ...
I mean... Let's that we just make an AJAX request and inser the result inside a div#result.. In the backend the script use ob_flush() to send the header but not terminate the request until it's terminated (with exit or ob_flush_end) The content will be loaded into the #result only when the request terminate (exit or ob_flush_end) or it...
I have a simple site put together to play a few flash videos. I have the information for the videos and their related comments stored in an xml file. I use SimpleXML to iterate through all of this and display the stuff in reverse chronological order. Everything works perfectly in IE8, Safari, and Chrome, but in Firefox the same video (t...
I've got a chunk of code that validates a user's username and password, which goes something like this: $sql = "SELECT * FROM user WHERE username='{$_POST['username']}' AND password=MD5('{SALT}{$_POST['password']}')"; Is this any more/less secure than doing it like this? $sql = "SELECT * FROM user WHERE username='{...
Hello all! Could you all give me an idea on how can i hide a specific value from an unregisted user? But once a user logins, that value should be visible? Thanks :) ...
Hi, I'm having a lot of trouble with unicode (UTF-16) values and PHP/XML. I want to read a set of unicode values from XML and output the correct glyphs to the browser. I've tried with UTF-8 and I get the same problem. This is a simple working example I used for my first test: $text = "\x00\x41"; $text = mb_convert_encoding($text, "AS...
I have a site that will be hosting small MP3 files. I want to create a utility that will allow me to combine the mp3 files together to create a single MP3 file. I'm somewhat new to PHP but not new to programming. Ideally, I would have a function that let me specify the a starting file and then append the second file to the existing fi...
Are there any good tutorials that outline proven Architecture patterns for Facebooks applications? Most of the resources I've found in their development documentation are hello world oriented. I'm looking for something (article, book, screencast, etc) that outlines common things that a Facebook application will do, and common, proven ,...
Just out of curiosity, Does the alias of a built-in PHP function take any more power than the regular function itself. AKA, does sizeof() take more time than count() to run? Note to Micro-Optimization Police: Unless there is a HUGE difference, I don't plan on trying to micro-optimize my script. Was just curious. Note to the 'Just tr...
I'm looking for a content management system (CMS) written in PHP for a large and diverse website. Here's what I'm looking for: Design flexibility -- The look and feel needs to be completely customizable. Specific pages may need to have design elements Modular design -- I want to be able to add features myself if they're needed. Product...
I know it's not an easy question to answer, but a client of mine came to me and asked if I'd be interested in a "get paid to learn objective-c and iPhone development" project before they go to another developer. I come from a a web background and my primary languages is PHP. I consider myself to be at expert level. I develop using Zend...
I am using the pChart class library to display .png Image on the browser. Through AJAX, I call the controller action graphgenerator to call generateGraph function in a model and display the output through a view on the browser. The generateGraph function in the MVC model, tries to generate graphs in a loop with an HTML table using pChar...
First day I use phpDocumentor and so far so good, but I have a question that I didn't catch in the manual... The documentation of global variables. How would I document this code if: $someGlobalVar is not decalren in the PHP file of the class (it can even be undelared). $someGlobalVar is declared like this: $someGlobalVar = array(); (...
Hi, I'm trying to get my head around the form framework in Symfony 1.4. I've read the incredibly detailed section in the 'More with symfony' book, but I'm still a but unsure how to implement a simple 'Change password' functionality. The requirements are pretty basic, There'll be two fields, new_password, and confirm_new_password. Bot...
I was wondering if there's a decent resource for finding the inner workings of PHP. I have taken a look at the source, but a decent explanation would really help. Some example questions I'd like answered. How does a PHP script get interpreted into machine readable code? How does it interact with Apache, how does apache collect the HT...
For a custom application I need to transform xhtml to (custom) xml. After some experimentation I decided to give php5's XSLT functionality a try, but so far I'm unable to transform nested p tags to their xml equivalent. Basicly we have code like this: <p>Some text</p> <ol> <li><p>Some more text</p></li> .. </ol> This needs to b...
I'm trying to ascertain what should happen when an XML parser reads in attribute a of element x in the sample below: <!DOCTYPE x [ <!ELEMENT x EMPTY> <!ATTLIST x a CDATA #IMPLIED> <!ENTITY d "
"> <!ENTITY a "
"> <!ENTITY t "	"> <!ENTITY t2 " "><!-- a real tab--> ]> <x a="CARRIAGE_RETURNS:(&d;
),NEWLINES:(&a;&...
I have this code that runs with every page load: $output = "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n"; $output .= print_r($events, 1); $output .= "\nTotal Doctrine time: " . $time . "\n"; $output .= "Peak Memory: " . memory_get_peak_usage() . ""; file_put_contents(BASEPATH."/logs/doctri...
I was reading this article: http://www.devarticles.com/c/a/PHP/Creating-a-Membership-System/2/ I am not sure if I understand sessions properly. Do I have to start a session for each member protected page? or do I just have to create one session and check if the user is in a session on each and evey page? how would I do that? Examples a...