New on his blog today Matthew Turland has posted about a "gotcha" he came across when working with cURL to pull down information (scrape content) from a remote .NET application.

I recently wrote a PHP script to scrape data from a .NET application. In the process of developing this script, I noticed something interesting that I thought I'd share. In this case, I was using the cURL extension, but the tip isn't necessarily specific to that. One thing my script did was submit a POST request to simulate a form submission. [...] The issue I ran into had to do with a behavior of the CURLOPT_POSTFIELDS setting that's easy to overlook.

The problem was something cURL does automatically - change the header for the content type because you're sending an array. Thankfully, with the help of a call to http_build_query to encode it correctly, the request will use the right headers.

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.

A new post to the php.evangelism mailing list has started up a great discussion on something that a lot of users seem to be in favor of - trying to get PHP accepted by Microsoft to be included in its Dynamic Language Runtime environment.

I am wondering why there isn't any effort in the PHP community to get PHP into the DLR. If nothing, DLR is yet another platform, and for a php programmer it gives one more playground to showcase his skillset. Anyway, my question is whether there would be any community effort to get MS adopt PHP into CLR too. I am sure there is a genuine customer requirement, and enterprises have made quite a bit of investment in PHP and they would all love to be able to take it to the .NET platform.

Known as Phalanger, the project reached Version 2.0 Beta 2 on July 30.

The primary goal of the project, released under Microsoft Shared Source Permissive License, is to enable full functionality of existing PHP scripts on .Net without any modification, Microsoft said. Unlike the original PHP interpreter, Phalanger compiles scripts into MSIL (Microsoft Intermediate Language).

The article goes on to talk about the project, the advantages it has over previous attempts, and where it's headed in the future. You can check out the CodePlex site here.