php

How can I generate a round robin tournament using PHP and storing into MySQL?

Duplicate: How can I generate a round robin tournament in PHP and MySQL? I need to generate sequences of games using the round robin algorithm. I have the php page where the user can input the tournament name which will be inserted into the database and it has got a drop down menu up to 32 teams (select number of teams). So if I ...

Is filter_var a good way to go?

Is filter_var any good for filtering data? What kind of bad data will it filter? I do use mysql_real_escape_string but I wonder if adding filter_var will help? ...

Is using php sleep() function a good idea to keep CPU load down with heavy script ?

I have a "generate website" command, that parses through all the tables to republish an entire website into fixed html pages. That's a heavy process, at least on my local machine (the CPU rises up). On the production server it does not seem to be a problem so far but i would like to keep it future proof. Therefore i'm considering using t...

Parse big XML in PHP

I need to parse pretty big XML in PHP (like 300 MB). How can i do it most effectively? In particular, i need to locate the specific tags and extract their content in a flat TXT file, nothing more. ...

Should I pass the BrainBench Design patterns certification?

I have found Design patterns certification at the Brainbehch. I have heard from people who passed it, that there are many Language-specific patterns questions, mostly from Java and C++. I think that this certification can: force me to improve my skills on Object oriented design and design patterns; improve and structure my knowle...

What are some good distributed queue managers in php?

I'm working an image processing website, instead of having lengthy jobs hold up the users browser I want all commands to return fast with a job id and have a background task do the actual work. The id could then be used to check for status and results (ie a url of the processed image). I've found a lot of distributed queue managers for r...

Need an info on PHP Reporting Framework/API/Tools

I have created My portal on PHP and MYSQL. I am unable to find a competitive PHP based tool/Framework like Jasper report which can be used to design reports The framework must be an Open source and rich and flexible in extending its basic functionality Do you know solution to problem of reports in PHP ? ...

Creating a PHP file that downloads all links from a certain site

I recently installed the add-on "DownThemAll" into my firefox and as I watched it download a huge amount of pk3 files(map files for an opensource First Person Shooter), I wondered if I could do the same with PHP. Here's what I'm thinking: foreach(glob("http://www.someaddress.ext/path/*.pk3") as $link) { //do something to download... ...

Secure PHP file uploading

I'm trying to develop a file uploading module on our new site that allows you to upload any file to our servers. The uploaded file is uploaded to /files, in which the following .htaccess to prevent users from executing i.e a .php file: <Files *.*> ForceType applicaton/octet-stream </Files> This triggers the browsers download window (a...

What problems can arise if php mysql client doesn't match the mysql server version?

I have two installations of mysql server 5.1.32 and 5.0.77 (same machine, os x leopard). My php mysql extension is compiled against 5.0.77 (that was the easiest thing to do, and I did it after installing 5.1.32). I'm using the 5.1.32 installation since that's what I compiled my python MySQLdb extension against. I don't code in php much i...

Should validation be done in Form objects, or the model?

This question is mainly geared towards Zend in PHP, although it certainly applies to other languages and frameworks, so I welcome everyone's opinion. I've only recently been using the Zend framework, and while it's not perfect, I have had a pretty good time with it. One thing that drives me crazy, however, is that most of the examples ...

php mcrypt_encrypt to C/C++/MFC equalivilent

Hello I have a PHP script that generates a product key for an application written in c++/MFC. The product key is email to the user and the user copy and pasts it in to my application. function EncryptData( $data ) { $key = "abcdefghijklmnopqrstuvwxyz"; // This encrypt method is described here // http://ca3.php.net/mcrypt $val =...

Looking for a PHP query designer framework

I have a client that wants to move their users from MS-Access to a PHP/MySQL web application. The data has already been migrated to MySQL and, thankfully, there are no Access forms, just queries. What they want me to do is build some kind of querying framework where users can build queries, save them, filter/drill-down results, sort by...

Prevent Back button from showing POST confirmation alert

I have an application that supplies long list of parameters to a web page, so I have to use POST instead of GET. The problem is that when page gets displayed and user clicks the Back button, Firefox shows up a warning: To display this page, Firefox must send information that will repeat any action (such as a search or order confirma...

Overriding yum dependency checks when newer versions of the dependent software exist

I'm using yum on CentOS 5.1 - I hand-compiled PHP 5.2.8 from source, but have other packages installed using yum. I need to install a PHP extension via pecl, and it requires phpize to be installed as well. However, doing the following yields a dependency error: sudo yum install php-devel Error: Missing Dependency: php = 5.1.6-20.el...

Is there a way to make FPDF/FPDI or Zend_Pdf support the parsing of PDFs greater than 1.4?

I am trying to add an existing PDF (created otherwise) to a PDF created with FPDF using FPDI. It seems to work find for most PDFs, but I get the following error: FPDF error: Unable to find xref table. After some testing, I figured out that if I use a PDF version of 1.4 or lower (Acrobat v5 or lower) it seems to work. Looking at the fi...

Simplest way to increment a date in PHP?

Say I have a string coming in, "2007-02-28", what's the simplest code I could write to turn that into "2007-03-01"? Right now I'm just using strtotime(), then adding 24*60*60, then using date(), but just wondering if there is a cleaner, simpler, or more clever way of doing it. ...

automatically composit sound - php or something like that - GD library for sound?

Ok does anybody have any idea for good ways to accomplish the following: A user programs some drum loops in flash and is somehow able to download or save an mp3 of the loop. I thought that the pattern could be composted on the server side. Then a link to the file is sent to the user. I had thought there might be something like image...

google maps not working anymore at the drop of a hat

2 days ago, I was working on a project that involves google maps. The website showed the maps on the pages just fine. Now, I come back to my workstation, nothing has changed, expect for the fact that the google maps won't show up anymore. The code is identical, nobody has touched my machine since I was gone, I've checked the html, every...

Get the hierarchy of a directory with PHP

I'm trying to find all the files and folders under a specified directory For example I have /home/user/stuff I want to return /home/user/stuff/folder1/image1.jpg /home/user/stuff/folder1/image2.jpg /home/user/stuff/folder2/subfolder1/image1.jpg /home/user/stuff/image1.jpg Hopefully that makes sense! ...