News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Christian Weiske's Blog:
Importing huge XML files using PHP5 - efficiently and conveniently
August 25, 2008 @ 09:34:38

Christian Weiske has a quick tip on how to get larger XML files to pull into PHP5 and be usable:

At work I had the task to implement the synchronization between an online shop and a commodity management system. Data exchange format was XML - one big XML file for all of the products (some thousands with dozens of attributes). Big question: How do I import the file in a way that is most convenient for me as a programmer - and without exceeding the machine's RAM when loading a 1 GiB file?

The newer alternatives both use the same technology (DOM and SimpleXML - with DOM behind it) so he goes more "low tech" than that and opts for the XMLReader extension to pull in the large amounts of data. Available in PHP5, the XMLReader extension, which he combines with an Iterator from the SPL to makes for a simple, quick little parser.

0 comments voice your opinion now!
import xml file php5 efficient convenient xmlreader spl iterator



ThinkPHP Blog:
Using LDIF to simulate LDAP transactions with PHP
July 01, 2008 @ 08:45:18

On the ThinkPHP blog today, there's a new post from Stephanie Ehrling about simulating an LDAP connection and data request to PHP with LDIF.

An LDIF file is a simple text file that can contain those LDAP information, which can be separated into two groups. On the one hand, it can hold exported LDAP data in a text format. The other purpose of LDIF is to use it for importing data into an LDAP based system. So it can contain data to be imported or just commands that shall be processed. This is an important fact, because that opens the door to an interesting workaround.

This workaround allows you to import large amounts of data quickly and easy by dumping it into the server via a simple PHP script. The code is included in the post, but you'll need to have the binaries to get the LDIF and LDAP functionality working together.

0 comments voice your opinion now!
ldif simulate ldap connection data import binaries ldapmodify


Zend Developer Zone:
Data Migration and Import Examples
May 22, 2008 @ 11:16:26

The Zend Developer Zone has a new article that supplements a podcast from the PHP Abstract series recently given by Lorna Mitchell on "Data Importing".

It is a simple walkthrough of some examples of the techniques mentioned in the podcast. It is much easier to visualise queries and data structures if written down, so here we look at an example of each of the points mentioned.

Her examples convert employee information over from one table to another via some SQL queries and splits out the information into the parts to fill the table (done with inserts and updates).

0 comments voice your opinion now!
data migration example import podcast phpabstract tutorial


Zend Developer Zone:
PHP Abstract Podcast Episode 40 Data Importing
May 15, 2008 @ 15:24:10

The Zend Developer Zone has posted their latest episode of the PHP Abstract podcast series. This time, Cal's brought in Lorna Mitchell from Ibuildings to talk about importing data.

Today our special guest is Lorna Mitchell. Lorna is a Developer at Ibuildings in the UK, and is based in Leeds in the North of England. She is a Zend Certified Engineer and the senior member for phpwomen.org in Europe. Today, Lorna will be talking to us about Data Importing.

There's three ways to get this new episode - you can either download the mp3 of the show, listen using the in-page player or subscribe to the show's feed and get this and other great episodes automatically.

0 comments voice your opinion now!
phpabstract podcast episode lornamitchell data import


Greg Szorc's Blog:
Using DTD's and Catalogs for XHTML Validation
April 10, 2008 @ 11:29:48

Greg Szorc shows how, in this entry on his blog, to use DTDs and catalogs to validate your XHTML pages with a little help from PHP.

This [validation from an external site like the W3C validator] approach is a good start, but it is far from ideal because it is based on an honor system of sorts. You often forget to validate each change you make and there is always some corner case that you forget. So, what can be done about it? Well, if you find yourself developing in PHP, you can employ the following solution.

The code he includes pulls in the XHTML content from your page (or the output of the framework's view layer) and pushes it into a DOMDocument that's build with the LIBXML_DTDLOAD and LIBXML_DTDATTR options.

0 comments voice your opinion now!
html validation dom extension document import


Developer Tutorials Blog:
Working With Wordpress Offline Like a Pro
April 10, 2008 @ 09:48:51

On the Developer Tutorials blog, there's a new post showing you what all you'll need to install to work with WordPress offline "like a pro" on your local machine.

I used to work off of my web server but the problem I've had lately is that when I'm not connected to the internet I haven't been able to code for Wordpress in a way that allows me to view my changes. Since I started using the techniques used in this tutorial my productivity has increased significantly.

His method has you install MAMP on your local machine (for the Windows users, WAMP is just about as easy to set up) and how to import content over from your remote server to the local machine. Of course, you could just set up a subversion repository, but that's another tutorial...

0 comments voice your opinion now!
wordpress ofline mamp wamp configure import content webserver


Expirmentalworks.net:
Inofficial PHP GIT repositories - Importing large trees
January 08, 2008 @ 10:24:00

David has posted an article to the Expirmentalworks.net blog about a task that he and Johannes Schluter have finished up - importing the PHP CVS tree over into Git.

A few month ago Johannes Schluter and I started discussing about GIT and other decentralized version control systems. During our exploration of GIT we thought about importing the PHP CVS tree into git. A few weeks later and a lot of wasted cpu time, we finally managed to provide an inofficial GIT mirror of the PHP CVS repository. It's provided by Johannes Schluter and mirrored by me.

The post documents the path they followed - using git-cvsimport, parsecvs and a path they needed to make - to finally get the import working without any flaws. You can check out their unofficial repository here (it's updates twice a day from the live CVS).

0 comments voice your opinion now!
git version control cvs tree import patch gitcvsimport parsecvs git version control cvs tree import patch gitcvsimport parsecvs


David Coaller's Blog:
Namespaces part 1.2 Namespaces
November 08, 2007 @ 11:17:00

David Coaller has posted about a major change in the way namespaces will be implemented in the upcoming PHP 5.3 release - a change from using "import" to "use" for including a namespace in your code.

PHP Namespaces are no longer using the "import" keyword, this has been replaced to the keyword "use". Quite simple he ? There are a few reasons behind that move, but let's all drop the political reasons and say at least that many many projects in the open source world do use the import() function to do all sorts of weird imports, and it's just simpler to use "use".

He also links to the original email from Stanislav about the reasoning behind change. He's also updated his previous post to reflect the change.

0 comments voice your opinion now!
namespace import use change implement namespace import use change implement


David Coallier's Blog:
PHP Namespaces (Part 2 Namespace constants)
August 27, 2007 @ 08:58:00

Following up from his previous post about namespaces in the upcoming PHP6 version of the language, David Coallier has posted part two, a look at namespace constants.

Hello all, welcome to that part 2 of PHP Namespace education. Again, Dmitry comes up with another patch that has been discussed a bit on the php.internals list and this patch gives us the ability to declare Namespace constants (just like a class constant).

Included is some versy simple code that defines the constant with the "const" keyword and imports it via a packaged namespace using the double-colons.

0 comments voice your opinion now!
namespace php6 constants import const package namespace php6 constants import const package


PHP 10.0 Blog:
Namespaces FAQ
August 20, 2007 @ 09:26:00

The PHP 10.0 Blog has the quick and dirty version posted today of the full namespaces readme that's been posted about the upcoming namespace support in PHP.

We now have an implementation of namespaces in PHP 6 HEAD, so here's a short FAQ about how they work for those that are too laz^H^H^Hbusy to read the whole README.namespaces.

It's an FAQ sort of list (quick questions and answers) with eleven questions that give an overview of what will be supported. This includes why they've been implemented, what some of the syntax is and looks like and how they can be used in files.

Also note namespaces are still work in progress, so it may happen it would be changed a lot when it's released.
0 comments voice your opinion now!
namespace import faq file support namespace import faq file support



Community Events











Don't see your event here?
Let us know!


application book ajax developer job releases conference cakephp example framework security zendframework PEAR database release package code zend mysql PHP5

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework