News Feed

News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Generate Excel Files and Charts with PHPExcel
September 11, 2014 @ 09:48:55

SitePoint's PHP blog has a new post that walks you through the creation of Excel files with the help of the PHPExcel tool, a part of the overall PHPOffice package.

After my article "How To Make Microsoft Word Documents with PHP" (using Interop capability under Windows), there were quite a few comments urging a pure PHP implementation, i.e., only using a universal PHP library to manipulate Office files. In this article, we will see how to use a PHPExcel library to provide an "Export to Excel" function in a web app so that the user can export the data into an Excel 2007/2013 file for further analysis.

His example spreadsheet shows game information for an NBA team (the LA Lakers) including some charting and analytic data in the exported output. He sets up a simple Silex application and both a base and export endpoints. He also shows you how to create the PHPExcel instance, configure it with properties like creator, title and a set of keywords. With this object in place he moves into setting data for each of the rows/cells, populating it from a database table. He also includes examples of creating more than one sheet of results, inserting formulas and creating the charts mentioned earlier.

0 comments voice your opinion now!
phpexcel tutorial excel microsoft chart formular export


VG Tech Blog:
Selenium Tests
June 21, 2013 @ 11:26:30

On the VG Tech blog today there's a new post introducing Selenium testing to those that might not have heard of it before for functional testing. It's a powerful tool that can even be used from inside PHPUnit tests to automate evaluation of your frontend application.

When we develop code at VG we have started to use Selenium tests for continuous integration. This allows us to easy write tests that programmatically checks that last commit didn't break anything.

He describes some of the types of tests Selenium can do and mentions the IDE that can hook into Firefox and record your actions and translate them into tests. This includes the ability to export them to PHPUnit tests (sample code provided) that extend the "PHPUnit_Extensions_SeleniumTestCase." An example screenshot of what the IDE running looks like is also included.

0 comments voice your opinion now!
selenium test introduction phpunit export ide firefox


Wojciech Sznapka:
Export colored Behat scenarios to PDF
September 04, 2012 @ 09:42:49

Wojciech Sznapka has shares his technique for creating colorized exports of Behat tests for use in PDF files:

Behat scenarios are one of the best ways to describe system. UML Use Cases or tons of pages in SRS documents are fine, but hard to understand from the begining, and even harder to maintain in the future. Behat eases this process and also gives opportunity to automate requirements verification. To write Behat scenarios you need a text editor. I've picked my favourite - Vim, which highlights *.feature files syntax. But business people mostly don't use Vim, so I need to figure a way, to expose scenarios in easy and pleasant way.

His solution involves setting up some printing options in vim to export the tests as a Postscript file, setting the "colorscheme" to the default setting so the colors will be retained. The result is exported (via the "hardcopy" command) and can be converted into a PDF (with a result like this).

0 comments voice your opinion now!
behat test color export postscript pdf print

Import GMail Contacts Google OAuth Connect with PHP
June 17, 2011 @ 11:11:15

In a recent post to the site, Srinivas Tamada shows you how to connect Gmail with your system to import contacts via the magic of OAuth (pulled from Gmail to you).

Inviting friends is the most important part of the web project success. This post explains you how to import Gmail contacts from address book via Google open authorization protocol connect with PHP. It's simple just few configurations follow below four steps, use this script and give option to invite more friends.

Following a few simple steps and using this simple script - registering the domain under Google Accounts, verify ownership and use the OAuth consumer and secret keys in the script. It's then simple to grab the contacts and output their details as the "Contacts.php" example script shows.

0 comments voice your opinion now!
gmail contacts oauth connection tutorial export
Import and export data using PHPExcel
July 15, 2010 @ 10:21:12

On the ThinkPHP blog today there's a new post looking at their experience with PHPExcel to open, modify, save, etc Microsoft Excel files directly from PHP.

EAR's Spreadsheet_Excel_Writer combined with the project Spreadsheet_Excel_Reader on SourceForge was a good helper in the past - but only for BIFF5. BIFF8 support in spreadsheet excel writer has been a problem for a long time, and according to the authors, is still somewhat kludgy in the current version. So I needed an alternative. After a short research I stumbled upon PHPExcel which supports reading and writing of many formats in one API.

He lists some of these input and output formats and includes a simple example of how to use the tool. He creates a basic Excel file with a few different attributes (title, body, keywords) and show how to read in a document to extract the document's content.

0 comments voice your opinion now!
import phpexcel export tutorial excel microsoft

Maggie Nelson's Blog:
Finally, pretty syntax highlighting for blog posts!
March 02, 2009 @ 12:52:27

Maggie Nelson points out a cool way that you TextMate users out there can get better syntax highlighted code for your blog posts.

A coworker, Craig Campbell just launched a new blog recently. One of the really neat things about his blog is how he handles syntax highlighting for code samples - check out examples in his interesting post about Cool Object Building with PHP. In fact, he got so many good comments about this approach that he even wrote a post explaining exactly how he does it: Syntax Highlighting for Your Blog Using TextMate.

Craig's process is as simple as selecting the TextMate bundle and choosing "Create HTML from Document with Line Numbers". The resulting output takes a little tweaking in the HTML and CSS, but the end result is quite nice (and better than several of the syntax highlighting plugins out there).

0 comments voice your opinion now!
blog syntax highlight textmate export html css
Creating a text or csv file of information from your database
December 10, 2008 @ 08:47:44

On the TotalPHP site there's a new tutorial showing how to pull data from your database and export it as a CSV file that tools like Excel can read in and use.

There are some occasions where you would want to export your site's information in CSV or similar text format. You might want to do this so you can view reports in a spreadsheet, or you might want an export of your product information to upload to a service like Google Products. Either way the method and end result are essentially the same.

The tutorial shows how to grab the information (via the mysqli functionality in PHP5) and formatting each row with the correct values in a certain order. Finally, the entire contents are echoed back out with the correct header() to force a download on the user's browser.

0 comments voice your opinion now!
csv tutorial mysqli database export txt format

Richard Davey's Blog:
A Guide to using CVS Dude with NuSphere PhpED
April 20, 2007 @ 08:39:00

If you're a user of the PhpED IDE in your development work and have had a bit of a hard time with the CVS support, you might want to check out this new post from Richard Davey with a guide on how to get started - specifically with the hosting service.

If you use NuSphere's excellent PhpED IDE then you'll know it has built-in CVS support for source control. This is a guide I wrote to using PhpED with the service, so you can get your projects up and running in no time at all.

He talks about getting a new project set up, configuring the server correctly in the Project Properties, and running an import for all of the files in your application's directory.

With that all in place, he also helps you set up the reverse - a place to check the files back out to be able to work with them easily (in a few simple steps). There's even shortcuts you can assign to help make running the CVS functions simpler.

0 comments voice your opinion now!
nusphere phped ide cvs cvsdude project import export nusphere phped ide cvs cvsdude project import export

Jakob Westhoff's Blog:
It's alive - Image_3D live browser rendering
April 04, 2007 @ 08:32:00

There's plenty of 2D graphics libraries out there, some 3D ones as well, but that hasn't stopped Jakob Westhoff from creating his own driver for the Image_3d package to allow for live 3D image browser rendering.

Quite some time ago my friend Kore Nordmann had a talk at our local PHP Usergroup about 3D rendering techniques which was quite inspiring. Shortly after that talk I decided to write a simple 3D renderer. But, hey there are so many of them already out there, that I decided to do something more unusual.

I just started over and began to write a ECMA Script based live 3D renderer for browsers which understand the new "canvas" tag. After some simple tests I realized that it would be quite cool to implement this as a driver for Kore's Image_3D package, which is entirely written in PHP.

Be sure to check out his post to see what this new driver makes possible. There's an image complete with controls to rotate, zoom, turn of its axis and export to both the SVG and PNG formats. Definitely work checking out!

0 comments voice your opinion now!
3d image render browser driver package rotate zoom export 3d image render browser driver package rotate zoom export
Two New Tutorials - Database Export & Sending Email
February 09, 2007 @ 12:36:00 has two new tutorials posted today - one dealing with the export of a database schema in an XML format and the other about sending emails from PHP.

Here's a link to the first article.

Sometimes it can be useful to have a dump of the current database schema. This script reads the schema from a MySQL database and outputs XML that describes the schema.

And a link to article number two.

So, you want to send automated email messages from your PHP application. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a monthly newsletter. Sometimes email contains file attachments, both plain text and HTML portions, and so on. To understand how to send each variation that may exist on an email, we will start with the simple example and move to the more complicated.
1 comment voice your opinion now!
database export xml schema sending email text html attachment database export xml schema sending email text html attachment

Community Events

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

introduction development language unittest podcast release series community threedevsandamaybe opinion feature framework extension api laravel wordpress library interview voicesoftheelephpant laravel5

All content copyright, 2015 :: - Powered by the Solar PHP Framework