Category Archives: Software

Shockingly Good Facebook Virus/Trojan Attack Attempt

So this morning a friend of mine sent me a bunch of messages on facebook, claiming that I was caught doing some funny stuff on video (entirely possible really):

By now I was suspicious, cause Amin doesn’t actually type messages out like a teenage girl (for the most part). So I clicked the link, and found this page next:

This is brilliant! A message that you need to update your Flash Player, very common for new installs of Windows. What makes it more convincing is the comments list — people from my Friends List, and that of the original victim appear to be egging me on to download the Flash Update and install it!

I suspect I’m going to be getting an increased number of desperate please for help within the next few days from people who worry if their antics have been caught on video, and as a result upgraded their Flash Player. Sigh.

UPDATE: Thanks to Sophie Hamilton, I have more info on it at Malware City.

Building a SOAP Server with Zend_Soap_Server and Returning Arrays of ComplexTypes

ZendFramework is awesome but suffers from a peculiar lack of thorough examples and documentation.

To save you all some time scouring the internet fruitlessly, I will document how to use Zend_Soap_Server, and Zend_Soap_AutoDiscover in combination with Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex (try saying that really fast a few times!).

A Complete Example

No one ever put together a full example in the documentation, their blog posts, the official Zend samples or anywhere else I searched yesterday. It’s always snippets here and there, and they don’t fit together well. So let me save you some trouble. I figure your reaching this page means you’ve already passed the first test which is to know the classes you need, which is why the search brought you here :)

I’m binding my webservice to a class, as that would be the logical choice in most cases.

/* these are required for it all to work */
require("Zend/Soap/Server.php");
require("Zend/Soap/Wsdl.php");
require("Zend/Soap/Wsdl/Strategy/ArrayOfTypeComplex.php");
require("Zend/Soap/AutoDiscover.php");


/* my system makes use of a global prefix, feel free to do as needed */
$serviceURL = WWWPREFIX . '/webservices/myservice';


public class MyService {
     /**
     *
     * @param integer $UserID
     * @return array
     */
    function GetCoupons($UserID) {
        // do some work here
        $coupons = array(new Coupon(), new Coupon());
    }
}

// Generate WSDL relevant to code
if (isset($_GET['wsdl'])){
    $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
    $autodiscover->setClass('MyService');
    $autodiscover->handle();
} else {
    $server = new Zend_Soap_Server($serviceURL . "?wsdl");
    $server->setClass('MyService');
    $server->setObject(new MyService());
    $server->handle();
}

There are a few points of interest in the code block above (which is a completely functional service btw):

  • Notice the PHPDoc block above the function? If you don’t get that right, it won’t work at all
  • The return type of array because we’re returning an array of objects
  • The Zend_Soap_AutoDiscover bit at the bottom? That’ll auto-generate your WSDL for you

There, you’re done. It should all just work, complete with WSDL auto-generation. If you’re looking to make use of an existing WSDL file, you can use the secondary method of binding to methods/functions as outlined over at the official documentation on Zend_Soap_Server.

Say thank you Uncle Kevin :)

Instapaper

Instapaper is one of the best web-based tools I’ve used in a long long while. I love the recommendations — I just skim the headlines and click Read Later. The Google Reader integration is awesome too. It just integrates so well into my daily routine.

Instapaper, an example of a tool that does one thing, and does it well.

SVNKit + Subclipse Problems

If you’re experiencing difficulty getting Subclipse working with SVNKit, install the very latest. One of the dependencies pulled in will list an SVNKit beta. Install that one and it’ll suddenly show up as a provider.

This is true as of Eclipse Ganymede and Subclipse 1.6.2 (installed with CollabNet Desktop). Just thought to save someone else several hours of their life :)

On Google Accounts

I have several domains running Google Apps for Domains. I also have a GMail/Google account. I’ve always found it odd that I cannot link my kevin@kevinfrancis.net account to my Google account in some way.

It’s a bit funny to have to keep what appears to be multiple Google accounts sitting around… I wonder if OpenID will factor into this in the future?

Update: Turns out that Google has fixed this now, by making Google Apps accounts first-class citizens, like gmail accounts. There is a downside though — you can only be logged into a maximum of 3 Google Accounts at the same time :(

Firefox Scaling Zoom Kills Performance

I’m rather insistent about scaling zoom being set by default 120% of my copy of Firefox. I achieve this with the NoSquint plugin add-on. Of late I’d been noticing that Firefox page scrolling was really really really bad.

Turns out this is caused by scaling zoom — turn the default page zoom to 100% and performance is really good, with scrolling being smooth and uniform.

Also, I today discovered that I’ve been right to avoid using the word performantperformant is not a word! Seems this is quite endemic to the technology industry as I’ve seen this word being used in everything from white papers to published books…

Safari 4 Scaling Zoom

Finally, Safari has page scaling in the v4 Beta. Sadly though it appears to exhibit strange behaviour with GMail for instance — When I zoom in, it also scales the width of the entire page, which means I now have to scroll left and right :(

Now, whilst this may or may not be the best thing for scaling zoom to do, my question is rather about whether it’s the right thing to do…

Page scaling should in theory scale everything right? Thoughts anyone? Perhaps you’re familiar with the W3 recommendation on this matter…

Overall Impression of Windows 7

After using Windows 7 for 2 weeks I think I’ve got a pretty good feel for it. I haven’t wavered once in all this time, sticking closely to my goal of using Windows through and through.

It was not an ordeal. It was not painful. It is a definite improvement over XP/Vista. Will I switch to using it full time rather than Linux? No.

Windows has improved to the point where it no longer makes me rip my hair out, but it still doesn’t impress me. It’s finally what I expected Windows XP to have been, so really, I’m not impressed. I am however not irritated by it, which is impressive.

P.S.: For all you who are considering it — nothing has proven incompatible for me except for Daemon Tools which won’t install at all. Yes it is faster. No, really.