php

Batch convert unknown file encoding to UTF-8

I need to convert some files to UTF-8 because they're being outputted in an otherwise UTF-8 site and the content looks a little fugly at times. I can either do this now or I can do it as they're read in (through PHP, just using fopen, nothing fancy). Any suggestions welcome. ...

Do you use any GoogleMaps Api PHP wrapper class/libarary/script to plot maps?

I want to display google maps (mutliple markers etc) and just found that there is one paid solution "GMap 2.3" for PHP. I was looking for an open source solution. Do you guys code using Google Maps API functions or use any wrapper script? What are some good links for this? ...

Jquery -> php -> mysql and dynamic form fields

I have a multi page form which uses multiple tables in mysql for the entered values. One of the pages has a form which needs to have the option of enabling the user to click a + to add an extra line if they want to include extra information. There can be any number of lines added. When the user clicks the +, jquery and php inserts the c...

Building Paypal based membership website - total noob - would appreciate help

Hi guys - this is a follow up on my question on paypal integration. I'm working ona membership site for racing fans. My membership site has 3 membership levels - free, gold and premium. When a user signs up he/she can gets a free membership on the spot but has the option to upgrade to a gold membership for 4 Dollars a month or a premium ...

using results from one mysql for a second query

I have two tables: posts - holds post information listen - holds information on what other users you are listening to. (what users posts you want to view) The structure of listen is: id(uniqueid) userid(the users unique id) listenid(id of a user they are listening too) How would I gather all the entries from listen that mach...

How to access kiosk id reader data from PHP based Web Application

Has anyone done something like this? How? I'm just starting a project that will have a browser based web application (using PHP and possibly an Ajax framework like Dojo or JQuery) that is presented to the user from within a kiosk unit. It's basically a survey in a browser but will need to id the user via the id card swipe reader on the ...

Using file_get_contents or curl to url on same server

I have a PHP script that needs to process the same site's RSS feed. Specifically, I'm displaying the most recent blogs from the WordPress RSS feed on the home page. On our staging server it worked fine but on our live (which is a completely different, but LAMP) hosting environment it's not working. I can run file_get_contents or cur...

Does HTTP hostname case (upper/lower) matter?

In other words, does it matter whether I use http://www.example.com/ or http://wwW.exAmPLe.COm/ ? I've been running into strange issues with host-names lately: I have an Apache2.2+PHP5.1.4 webserver, accessed by all kinds of browsers. IE6 users in particular (esp. when their UA string is burdened with numerous BHOs, no pattern yet) seem...

How to redirect a Google search result to a dynamic Web page?

I'm trying to enter a list of items into Google Base via an XML feed so that, when a user searches for one of these items and then clicks the search result link in Google Base (or plain Google), the user is directed to a dynamic Web page on my Web site. I'm assuming that the only way to specify a specific link (either static or dynamic) ...

Problem using PHP exec command to execute a batch file

I'm attempting to get PHP to call a batch file which will take an RTF file and convert it to a PDF using an OpenOffice macro. I've tested the batch file on the command line and it works fine, but I'm not having any luck calling and using the same batch file from PHP. My machine OS is XP professional SP 3. I'm running IIS 6 and PHP ver...

How can I match everything with a PHP regular expression?

How can I match everything with a PHP regular expression? I tried: /[.\r\n]*/, but it isn't working. Any ideas? Thanks. This is for a method I made for a PHP class to parse e-mails: public function getHeader($headerName) { preg_match('/[\r\n]' . $headerName . '[:][ ](.+)[\r\n][^ \t]/Uis', "\n" . ltrim($this->originalMessage), ...

Can PHP read the hash portion of the URL?

Assuming a URL of: www.mysite.com?val=1#part2 PHP can read the request variables "val1" using the GET array. Is the hash value "part2" also readable? or is this only upto the browser and JavaScript. ...

array_filter filtering out entire array

I have an array of arrays, each array containing details of a scan by a medical device. I'm getting this data from text logs that are dumped nightly. The format of which is this: $this->scans = array( array( 'patientid' => (int), 'patientname' => 'John Skeet', 'reviewed' => 0 or 1 //plus more irrelevant ), arr...

How is Yii Framework doing in PHP world? Any good or bad recent experiences.

Personally I like the many features that it offers. I have seen some questions but they are old, so want to gather some response from people who used it or planning to use it. If you are planning to use, how did you arrive at this framework? ...

PHP: Implicit conversion to string instead of getting "Object ID #.."

I've moved to a new webhost were we have php 5.1 instead of 5.2 that I've been using until now. I still haven't figured out if it's a php version or configuration issue. Right now most (or all) of the classes that have __toString functions convert to "Object ID #" (like in php4) but before they all returned the correct values. How can ...

Action View Helper in Zend - Work around?

I'm working on building up an interface that I want to function as a "tabbed browsing" sort of function. Each of these tabs has already been written as an action and the tabbed interface works fine as links to the individual tabs. I decided to try writing the "index" page for this controller - putting the content of all the tabs into h...

PHP: how to create and ftp a file to another server?

We are setting up a drop-ship agreement with a vendor to where we don't have to stock their products we just sell them and they ship them out. To inform them of an order they want us to FTP upload a tab delimited .txt file with the order info to their site. We want to automate this. So given the user/pass for the ftp is there a way to cr...

Where is the documentation for writing Magento Extensions?

I have looked and looked on their website, I have tried many google searches, but I can't find a link to documentation on how to write extensions for the Magneto ECommerce software. I want to write a simple payment gateway which I'm more than capable of doing if I could find basic documentation. Any ideas? ...

Is it possible to capture search term from Google search?

This may be a stupid question, but is it possible to capture what a user typed into a Google search box, so that this can then be used to generate a dynamic page on the landing page on my Web site? For example, let's say someone searches Google for "hot dog", and my site comes up as one of the search result links. If the user clicks the...

Recommended server for Continuous Integration for PHP Project

I'm working on a PHP project and I would like to know recommendations for implementing continuous integration. I've read all the theory, but never got to use continuous integration. So it should be rather easy to start. I've read about Xinc, Hudson, among others, but I would like to get some feedback based on experience. Have you used ...