php

How to post SOAP Request from PHP

Anyone know how can I post a SOAP Request from PHP? ...

CSS 2.1 compliant HTML to Microsoft Word conversion?

I've found a superb HTML to PDF converter in Prince XML. Now I'm looking for something of similar quality to produce Word documents from HTML + CSS. This is on PHP/Linux. ...

POST XML to URL with PHP and Handle Response

I've seen numerous methods of POSTing data with PHP over the years, but I'm curious what the suggested method is, assuming there is one. Or perhaps there is a somewhat unspoken yet semi-universally-accepted method of doing so. This would include handling the response as well. ...

Add RSS auto-detection when using Zend Layout

I've got a site using Zend Layouts and on certain pages I'd like to add RSS auto-detection (adding a <link> in the head section). How do I add this to the layout just on certain pages? ...

A good php project to show to a possible employer

I have an interview with a possible employer next monday, I'll code friday, saturday and sunday, just because I need the job (first one) and I like to code. The thing is I need a good project idea that I could show to him. I know OOP, design patterns, good practices, etc., but I have not a portfolio since it is my first job; most of my c...

Port a Ruby/Rails application to PHP 5

I have a very large Ruby on Rails application that I would like to port to PHP 5.2 or maybe PHP 5.3 (if 5.3 ever gets released). I've been looking for a some way of automatically converting the simple stuff like simple classes and the ERB templates. I would expect that I'd have to do the more complicated stuff myself in cases where the ...

Good or Bad? Bring "Function Chaining" Capabilities to PHP

So I was thinking one way that you can bring method chaining into PHP with the built-in global functions would be to "borrow" the |> (pipe) operator from F#. It would pipe the results on the left into the first parameter of the function on the right. Of course PHP would have to revisit the parameter order of some of their functions. T...

I am looking for a php webbased free query analyzer to see slow and currently executing SQL statements

I am looking for a php webbased free query analyzer to see slow and currently executing SQL statements ...

How do I edit contacts from the front end in Joomla 1.5x?

I'd have thought this would be a native feature (seeing as joomla allows you to connect contacts with user accounts) but we can't find any way to do this! does anyone know of any extensions/modules that would allow this? I'm not so hot on PHP so i'd really love to not have to code this by hand! ...

PHP regex to get contents of a specific span element

I need some help ... I'm a bit (read total) n00b when it comes to regular expressions, and need some help writing one to find a specific piece of text contained within a specific HTML tag from PHP. The source string looks like this: <span lang="en">English Content</span><span lang="fr">French content</span> ... etc ... I'd like to ex...

Zend Framework Routing: .html extension

I know I've seen this done before but I can't find the information anywhere. I need to be able to route with .html extensions in the Zend Framework. I.E. /controller/action.html should route to the appropriate controller / action. We have an idea to throw away the .html extension with our .htaccess file but I think changing the route c...

making a constant heading - css problem

I have an AJAX application which has used CSS divs to create panels on the screen, which are loaded separately and in succession, depending on what was loaded before it. The bottom "panel" is a table showing a list or records from a database. At the top of the database is the name of the table, and I would like a way to have it be always...

Should I avoid Alternative Control Syntax?

As a mostly self-taught programmer, I have never really had anyone explain why certain things should or should not be used. One example (which I picked up years ago and use quite often) is the alternative control structure syntax: x = (y == true) ? "foo" : "bar"; I personally find this syntax easy to follow, especially for short, conc...

css problem with constant heading

I am trying to have a table header, in a seperate div stay in place while a div undernearth is able to scroll al arge list of records. Both divs are in a div named Layer 3. Hereis the css file I am using: #Layer3 { position:absolute; width: 89%; height: 40%; left: 10%; top: 56%; background-color: #f1ffff; ...

How to trace and profile all low level calls (c libraries) being used by a mod_perl or a mod_php application?

I've seen once on a site, a call graph digging into the most low level libraries of a web request initiated by a PHP appplication with call timings and summary. Seems to me that this is a great way to spot the reason of bottlenecks that aren't obvious while profiling PHP-only code. Something like strace does but with far more detail. ...

How to use miniclip algorithm in a TIc-Tac-Toe game(X0) php

Hi I am working on a online TIc-Tac-Toe game using the miniclip algorithm to calculate the best move.I found few examples but i really don't understand the miniclips logic.Some example would be great. Thanks! ...

css div not being recognized

Hello, I have the following css code: #Layer3 { position:absolute; width: 89%; height: 40%; left: 10%; top: 56%; background-color: #f1ffff; } #Layer3 h1 { font-size: medium; color: #000033; text-decoration: none; text-align: center; } .tableheader { border-width:10px; border-style:solid; } .tablecontent { height: 95%; ...

Validate each element in an array?

Hello, I am currently trying to validate a form server side, the way it works is all the data is put into and array, with the form field as the key and and the field data as the value, however I need to check that all the keys have a value associated with other wise I want the submittion to stop and the user having to edit there detail...

Uploading files to a folder that is above the current folder

$result = mysql_query("SELECT * FROM media WHERE path = '$target'"); if($row = mysql_num_rows($result)==1) { echo"<br />Sorry, there is already a file with that name on the server.<br />Please press back on your browser and save the file under a different name."; }else{ if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)...

Unit Testing: Beginner Questions

I'm finally starting out with unit testing, having known that I should be doing it for a while, but I have a few questions: Should or shouldn't I retest parent classes when testing the children if no methods have been overwritten? Conceptually, how do you test the submitted part of a form? I'm using PHP. (Edit: The reason I ask this is...