php

Reverse Proxy PHP

I want to develop software that will allow people to log in and pay a bill. The software will have to connect to a server hosted at a client (could be many clients) and retrieve some information. The issue is that I want to make it work in any scenario. Similar to the home remote control software like goto my pc. I have no gurantee o...

Best way to send anonymous email like craigslist

Hi, Craigslist has a nice feature where when you respond to a poster you respond to an email such as [email protected]. The email is then in turn directed to the real email. I am looking for a couple pointers on how to do this with PHP. Thanks, Levi ...

How do I set partial transparancy in GD with PHP?

I am attempting to make a dynamic image with PHP, and I can't find out how to set partial transparency. It is very easy to make things either solid or fully transparent, but I have been unable to do this. ...

Freelance work and skill specialization.

I've been messing around with different languages and frameworks to find the right fit and I think at some point it would be nice to make money doing web development. Likely I would need to start out with freelance projects to find work at first, which I think would be ideal anyway. My problem is that there really doesn't seem to be mu...

How do I write a regex in PHP to remove special characters?

Hi, I'm pretty new to PHP, and I noticed there are many different ways of handling regular expressions. This is what I'm currently using: $replace = array(" ",".",",","'","@"); $newString = str_replace($replace,"_",$join); $join = "the original string i'm parsing through"; I want to remove everything which isn't a-z, A-Z, or 0-9. I'...

passing variables in a mvc pattern

Hello, I have built a system that conforms to the mvc pattern in PHP. The controllers and actions are part of the urls in my application. So I have: www.example.com/controller/action/ So now I am looking for a way to pass on variables. For forms I just use the post method, but sometimes I would just like to link to a different page an...

performance implications of php output buffering with Apache and MySQL

I am a bit confused about how php buffering works. Let's say you have a php page foo.php and output_buffering = 4096 in php.ini, and Apache recieves a get request for foo.php. foo.php starts executing, and as soon as 4096 bytes are ready, they are sent to Apache. Apache starts sending those 4096 bytes to the client. Here's what I d...

How can I attach two Radio Buttons in Zend Framework to one ID?

I am trying to create radio buttons with Zend Framework. This is the way I want to do it: ()Yes ()No John Smith ()Yes ()No Peter Fallon I want to attach two radio buttons to one ID: Thanks Ok now I am getting how this works, thanks for your patience. Well this is what I have. class ListForm extends Zend_Form { public functio...

Reasons why PHP mail might not be working

I'm using the PHP mail() function to send email from a contact form. The function returns true so should be fine. But I'm not receiving the email. I've seen posts that say you should always use the From and Reply-To headers in PHP mail to make sure it's delivered. I've tried various configs but nothing is working yet. Is there any othe...

content from database as default for text area in html form

I would like to know the easiest way to extract the text from a database field and set it as the default text for a text area. I am planning at the moment to assiign the field to a variable, and then using javascript set it as the default text, but I am unsure of how to do this last part. ...

Generate PDF with digital signature

Is it possible to generate PDF file in PHP with digital signature? An open-source solution is preferred. ...

Migrating php4/mysql4 to php5/mysql5: expected php issues?

I have a legacy web application php4/mysql4 (MyISAM, db contains some cms, some user data, some calendar application). Now I am going to migrate to a new server with php5/mysql5. What are the typical php issues in such a migration scenary (php, sql queries, anything)? I've heard that the function parameter passing changed, call-by-refe...

mysql prepared statement parameters and ordering queries

I have a form, the purpose of which is to place the currently displayed record into a category. I am using the following html code via php to do so: <form name="categoryForm"> <input name="radiobutton" type="radio" value="fakeapproved" />Fake (Approved)<p> <input name="radiobutton" type="radio" value="fakesuspected" />Fake (Suspecte...

How to find list of possible words from a letter matrix [Boggle Solver]

Lately I have been playing a game on my iPhone called Scramble. Some of you may know this game as Boggle. Essentially, when the game starts you get a matrix of letters like so: F X I E A M L O E W B X A S T U The goal of the game is to find as many words as you can that can be formed by chaining letters together. You can start with an...

php: remove excess <br> and   tags from a string

how can I remove excess <br> and &nbsp; tags from the start and end of a string? Thanks :) ...

Are there pointers in php?

What does this code mean? Is this how you declare a pointer in php? $this->entryId = $entryId; ...

Indentation with DOMDocument in PHP

I'm using DOMDocument to generate a new XML file and I would like for the output of the file to be indented nicely so that it's easy to follow for a human reader. For example, when DOMDocument outputs this data: <?xml version="1.0"?> <this attr="that"><foo>lkjalksjdlakjdlkasd</foo><foo>lkjlkasjlkajklajslk</foo></this> I want the XML ...

Where do I save partial (views) in Zend Framework, to be accessible for all Views in my App?

I have several view Partials (like paginator partial) which I want them to be available To all view scripts in my application. Is there a directory I can put partial vies in, and they will be available to all? Or, how do I define such a directory? ...

Best method for debugging a called webservice in php?

I have an n-tier system where a frontend templating layer makes calls out to a backend application server. For instance, I need to retrieve some search results, and the frontend calls the backend to get the results. Both the templating engine and the appserver are written in PHP. I currently use PHPed to initiate debug sessions to the t...

PHP form checkbox and undefined index

I am getting an "Undefined index" error when submitting a form with an un-checked checkbox. Is there any other way besides running an "isset" or "empty" check on each individual posted value? I have looked at this Question and am having trouble believing that this is the only solution. Below is some example code: EDIT: please not that...