News Feed
Sections




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:
PHP and WMI - Dig deep into Windows with PHP
December 24, 2013 @ 12:30:25

On the SitePoint PHP blog they've posted a new tutorial that "digs deep" into PHP on Windows with WMI, the Windows Management Instrumentation functionality - a web-based architecture information gathering system.

There are many devices (servers, desktops, laptops, tablets, phones, etc) running a Windows operating system. Many of us who live in the nix based world have to work in this OS, or if we don't, we will, sooner or later. Besides the regular tools we can expect from a *nix system (say Apache, PHP, MySQL, C/C++ compilers, etc), Windows offers a set of unique features not present in any other OS, and WMI is one of them. In this article, we will address the questions like: What is WMI? How to use WMI with PHP? We will have some minimal sample codes to go through the basic programming techniques.

He starts off the post briefly explaining what WMI is and what kinds of problems it solves. He shows you how to check if it's installed (it probably is on most recent Windows machines) and that it's enabled. He also shows how to configure the firewall to allow WMI connections and the library you'll need to get the PHP support functional (php_com_dotnet.dll). He then gets into what kind of information you can get from WMI including local hardware information, BIOS details and memory usage. Some simple code is included using the COM functionality to connect to the server and run a query.

0 comments voice your opinion now!
windows wmi information tutorial introduction com

Link: http://www.sitepoint.com/php-wmi-dig-deep-windows-php

Juozas Kaziukenas' Blog:
How to use external libraries in PHP?
May 23, 2009 @ 20:26:09

As a part of his work for the WinPHP Challenge Juozas Kaziukenas looks at some of the external library types that you can use with your (Windows) PHP applications.

External libraries are useful for performance demanding tasks where PHP is simply too slow. Also PHP can work as front-end system for various back-end systems (where server doesn't provide any PHP supported communication types). I have written some posts about using .Net libraries in PHP so far, but there are some other choices available too.

He looks at the three types of library choices - PHP extensions, exec call. For what he wants to do, though, the COM objects are the best fit for the job.

0 comments voice your opinion now!
external extension pecl com


An Phillips' Blog:
COM/.NET Interop in Zero PHP
January 29, 2009 @ 15:03:25

Ant Phillips looks a bit at some interoperability between the PHP and Project Zero when to comes to using the COM/.NET extension.

Zero doesn't currently support the COM/.NET extension in PHP. No matter though, there is a handy open source project called JACOB that bridges between Java and COM/.NET. In fact, there is an easier way to do this using a Groovy library called Scriptom. This is really just a friendly wrapper around JACOB to provide a better syntax for calling methods and accessing properties.

He also includes a quick introduction and howto on getting the functionality up and working in a Windows environment - download, add the JAR to your path, edit your php.ini and copy and paste some example code in to see it in action.

0 comments voice your opinion now!
com net interoperability zero extension jacob scriptom


NETTUTS.com:
Run Your Own TinyURL Service With Phurl
January 16, 2009 @ 15:31:59

In this recent tutorial from the NETTUTS.com website they show how you can create your own URL shortening service (think tinyurl or tr.im) with the help of the Phurl PHP application.

URL shortening services are a must if microblogging services like Twitter are to work. In 140 characters, you don't want the URL you're linking to eating up 100 of them. Or worse, it might not even fit. Enter TinyURL, and a bunch of other services that give you a shorter custom URL pointing to the target site. But why not roll your own, using Phurl? Let's do it!

The tutorial walks you through the installation (quick and easy thanks to a graphical installer) and some usage examples (with screenshots). A few other things - like branding and allowing multiple URLs - are suggested as future enhancements.

0 comments voice your opinion now!
tinyurl service phurl tutorial shorten url


Raphael Stolt's Blog:
Tinyizing URLs with Zend_Http_Client
November 03, 2008 @ 07:55:00

In this new post today Raphael Stolt shows how to use the Zend_Http_Client component of the Zend Framework to "tinyize" a URL.

In a recent blog post Dave Marshall outlined a quick workaround for tweeting via the Zend_Http_Client component which is a reasonable approach for calling services that aren't in the Zend Framework core yet like Zend_Service_Twitter or are not supported out of the box. Therefore this post will try to describe a Zend Framework way of creating tinyized URLs.

He creates a UrlShorterner interface containing a shortenize() method that automates sending a URL over to the tinyurl.com web service and returning the results.

0 comments voice your opinion now!
tinyize tinyurl zendhttpclient shorten url


Developer Tutorials Blog:
Extracting text from Word Documents via PHP and COM
March 26, 2008 @ 12:02:06

In a recent blog post Akash Mehta showed how to reach into a Microsoft document (a Word file) and pull out the content inside via a PHP script.

Communicating via COM in PHP is easy as ever; especially for people coming from a VB background where executing complex tasks in MS-applications is a piece of cake, you will feel right at home in PHP. In fact, VB COM calls can be converted to PHP COM calls in just a few simple search and replaces.

He shows how to use the COM extension in a (Windows) PHP installation to access the text inside the document and manipulate the contents however you'd like (even writing them back out to another Word file).

1 comment voice your opinion now!
com document word extract content manipulate


Milw0rm.com:
Exploit - PHP5 COM Object Security Bypass (Windows)
October 23, 2007 @ 09:31:00

An exploit for PHP's COM objects on the 5.x series has been reported by shinnai - an issue that allows for a bypass of safe_mode and disable_function settings.

The exploit has been published as a PHP file for easy testing on your Windows/PHP installation (it was tested on WinXP Pro SP2 on both the CLI and Apache). No additional modules are needed for this exploit - only the COM functions and a Windows system.

The issue comes from an overflow in the str_repeat function allowing for the execution of whatever applications the developer wants on the remote Windows machine (including the ability to create and remove files and directories). There is no path for this issue currently (should be corrected in the next minor PHP release).

0 comments voice your opinion now!
com object security bypass safemode disablefunction overflow strrepeat com object security bypass safemode disablefunction overflow strrepeat


JSLabs Blog:
How to create Microsoft Office Documents with PHP
July 02, 2007 @ 12:02:00

From the JSLabs blog today, there's a quick illustration of how to dynamically create three different types of Microsoft Office files - a Word document, Powerpoint and an Excel file.

There are two main ways to build Excel, Word, and PowerPoint documents using PHP. The first is by using the COM library (only if you are using a Windows server) and the other is by using a more standardized approach such as HTML or CSV.

All three examples use the COM method and make basic structures to save out. They also include a screenshot (and description) showing where you can find the list of functions you can call to the COM object for each application.

1 comment voice your opinion now!
microsoftoffice document excel powerpoint word com object microsoftoffice document excel powerpoint word com object


Adam Trachtenberg's Blog:
PHP 5 + COM + Skype Help Wanted
September 13, 2006 @ 07:15:49

Adam Trachtenberg is looking for some help in the COM department, specficially in using it with PHP5.

I'm trying to use PHP 5.2 to talk to Skype via the COM extension and Skype4COM interface.

I'm using this example from the Skype Forum, but I get a COM exception of "Skype client is not installed."

He also points to someone else with the problem, but still hasn't quite found a solution. Anyone want to help?

0 comments voice your opinion now!
php5 com skype help wanted skype4com interface not installed php5 com skype help wanted skype4com interface not installed


InformBank.com:
How to create Microsoft Office documents on the fly using PHP
August 07, 2006 @ 11:57:37

In this new tutorial from InformBank posted today, they show how to use PHP (and a few handy tricks) to create Microsoft Office documents on the fly.

Sometimes you have to generate some MS Office document for the users of your website using dynamic data. For example, few days ago, I had to generate some Excel reports using data from some tables in MySQL. I knew about the COM but it has a lot of disadvantages, including Windows-only platform and not very high speed. CSV is much easier and faster but you can't format the cells to make them better-looking. The method I've never thought about before was using HTML.

So here came the inspiration and after some research and experiments I wrote this tutorial for all of you who are looking how to create Office documents on the fly using PHP. Of course, I included the COM methods and some methods to create other MS Office documents like DOC and PPT, to make this tutorial as full and as useful as possible.

The tutorial starts with the creation of documents (Word, Excel, Powerpoint) with the COM functionality (the standby method PHP has had for a while). Of course, it also requires the script to be running on Windows to work. So, what's the other option? As he goes on to explain, it's something as simple as HTML.

He includes two examples of alternate mathods, showing hhow to use HTML or a CSV file to create a custom Excel document. He also throws in some code to help you stream out the resulting document as a zip file to the browser.

0 comments voice your opinion now!
microsoft document onthefly com extension html csv file microsoft document onthefly com extension html csv file


Justin Silverton's Blog:
Excel and php without COM
March 28, 2006 @ 07:01:46

At times, working within the confines of a Microsoft world can be frustrating, especially when it comes to making more advanced versions of files (i.e. a "real" Excel file versus a CSV). In this example, Justin Silverton gives us an example of how to do just that - use PEAR to create an Excel 5 file.

He uses the Spreadsheet_Excel_Writer package to create the file without the need for getting COM in the mix. The package makes it simple to take in a dataset and write it out to a workbook - complete with column headers.

He shows two ways to save the file as well - creating a local file (on the web server) and pushing it out to the browser.

It's a simple introduction, but it's a starting place - especially for those with a project plan that requires it.

0 comments voice your opinion now!
excel com without spreadsheet_Excel_writer PEAR excel com without spreadsheet_Excel_writer PEAR


Marcus Whitney's Blog:
Microsoft on PHP (podcast)
March 09, 2006 @ 07:02:23

In this new blog entry, Marcus Whitney talks about the upcoming php|architect webcast he'll be hosting interviewing two people from Microsoft - Brian Goldfarb and Joe Stagner.

I'm pretty excited about this weeks webcast. I'll be speaking with Brian Goldfarb and Joe Stagner of Microsoft about how PHP can be used for enterprise development on the Windows platform.

I think that everyone should consider checking in and asking these guys some questions.

He also mentions that Microsoft, for a long time, only saw PHP in the context of the LAMP "package" and not as a stand-alone language. Seems their outlook has changed a bit - check out the webcast to see just how much...

0 comments voice your opinion now!
podcast pro::php microsoft COM .NET ASP Active Directory Exchange podcast pro::php microsoft COM .NET ASP Active Directory Exchange



Community Events





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


community release introduction install bugfix developer wordpress configure code laravel interview api unittest list language podcast threedevsandamaybe library series application

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