Worldpay CARD Transaction Confirmation Spam/Virus

June 25th, 2009 DD No comments

This afternoon I received an email with the subject “Worldpay CARD transaction Confirmation“, which instantly caught my attention because I use Worldpay while paying off one of my credit cards, and for a moment I wondered if I had done it and forgotten about it.

The email content was as follows:

Thank you!

Your transaction has been processed by WorldPay, on behalf of Amazon Inc.

The invoice file is attached to this message.
This is not a tax receipt.
We processed your payment.
Amazon Inc has received your order,
and will inform you about delivery.
Sincerely,
Amazon Team

This confirmation only indicates that your transaction has been processed successfully.
It does not indicate that your order has been accepted.
It is the responsibility of Amazon Inc to confirm that your order has been accepted, and to deliver any goods or services you have ordered.

All very convincing and official-looking, but Amazon doesn’t use Worldpay, and the email was not sent to amazon@<my email domain> – it was sent to my office address which is only used for, well, office stuff.

The email attachment is a simple HTML file so it is not picked up as anything dodgy, but it comprises a single META REFRESH line directing you to an executable file hosted elsewhere, so don’t open the attachment.

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Twitter Porn Fail

June 15th, 2009 DD No comments
Twitter Porn Fail

"Kelly Ann"

One of the major irritants on Twitter is the sheer number of spammy, camwhore types that follow random people in the hope they’ll visit the profile paqge and click the link to whatever adult service it is they’re offering.  Many of these tend to be a single organisation with a referral scheme set up, and everyone who pays to view more pics of the girl on offer ends up putting money in their pocket.

Occasionally you get a genuine, bona-fide standalone female doing the same thing – sometimes you can tell, other times you can’t.  Often it’s the lack of technical knowledge that gives the game away, with links not working, pages down and so forth.

Even rarer, you get something like kellyann18 offering a small selection of pictures to entice people, with the promise of the real goods later.  Unfortunately, Kelly Ann (or the webmaster behind it) doesn’t understand that if you give your images sequential number filenames, it’s pretty easy to guess the URLs for the entire set.

FYI, there’s 20 in the series.  Numbered 1 to… yeah.

Update:
There’s also this page on the same site – not sure about the legitamacy of that one.  I posted the link to Twitter and the images were unlocked in just a few minutes, proving beyond a shadow of a doubt that Twitter users love a headline like “My girlfriend cheated on me. It’s PAYBACK time.”

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Categories: Internet, Spam & Viruses, Websites Tags:

Virgin Media Broadband Pricing

June 9th, 2009 DD No comments

With the credit crunch in full swing, it’s only natural that people will look for ways to save money.  Right now every little helps, and it was with this thought in mind that I decided to investigate cutting my broadband package to a lower tier.

As it transpires, Virgin Media dropped the basic (4Mb?) package and so I was on the lowest price anyway, but while investigating package options I discovered that the same package was available for new broadband customers – after an introductory discount – for £20 a month.

Whereas I, as a loyal customer of roughly seven years, have the priviledge of paying £25 a month.

I called Virgin and asked about this, and the basic response is that, yes the same package is available cheaper, but because it was £25 when I changed to it (I was on a higher tarrif), that’s what I’m stuck with paying.

Since they won’t drop the price for me, and I can’t simply cancel and rejoin (apparently I have to be a non-customer for 6 months) I’ve decided to cancel the package altogether.  My housemate will add broadband to their existing package and I’ll pay the difference, saving me £10 a month – fair recompense for the £5 a month Virgin Media have been overcharging me.

So Virgin are going to lose more money in the long run.  They’ve lost me as a customer and income from this household will be £10 a month lower than before while they supply the exact same services.

Check your bills and see what’s available via the Virgin Media website.  If you can cancel and re-open using another member of the household, you may be able to save yourself some cash.

VN:F [1.4.4_707]
Rating: 5.0/5 (1 vote cast)

Categories: Various Tags: , ,

WordPress Comments Restored

May 20th, 2009 DD No comments

I took a few minutes this morning to put a script together that would convert the comments from the old blog into the new WordPress format – another time-saving excercise that allowed me to convert 300+ comments in a few minutes.

The only hurdle I had with this was that the rowId for posts in the old table doesn’t marry up to the new one, so the process had to go something like this:

  1. Get the entry lookup for a comment.
  2. Find the titles of that entry from the old posts table.
  3. Look for that title in the new posts table.
  4. Grab the rowId from step 3.
  5. Save the comment with the new lookup.

So!  Comments are restored and visitors can continue their ranting and raving (especially on this post!), only with extra Spam protection for me, which is nice.

Edit:
Two posts in two days!  We’re on a roll!

VN:F [1.4.4_707]
Rating: 5.0/5 (1 vote cast)

Categories: Blog, PHP Tags: ,

The Move to WordPress

May 19th, 2009 DD No comments

I finally gave up resisting all the peer pressure and installed WordPress on the site.  As expected, the installation went just fine and the basic install worked OK right out of the box.  There were a couple of things I needed to do though:

Converting the old blog posts to the new format was fairly simple – just read them all out from my existing database table and put them into the wp_posts table for WordPress to use.  I wrote a script to do this bit and after a couple of false starts it went through the thousand-odd entries and moved them over.

The only real problem I had was getting the old blog URLs to work in the new format.  For reasons lost to me now, I had decided to use only 2 digits for the year, whereas WordPress uses 4.  A quick RewriteRule to affect a 301 redirect to the new URLs, and all my cached Google links are working again.

I better investigate some themes and plugins later.

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Categories: Blog Tags: ,

Wait, is this thing still here?

April 17th, 2009 DD No comments

So you may have noticed – assuming you are sad enough to actually check the front page more than once in a blue moon – that the site hasn’t been updated for quote some time.

The main reason is that I’ve been working on a pet project that I just launched this week, but I’ve also been messing about with Twitter, and since it’s more ADHD-pleasing than coming up with a decent-length entry on a bl0g, plus you get other people’s thoughts as well, I’ve actually rather been enjoying it.

Of course, all is not roses and sunshine. More and more frequently the Twitter hamster runs out of puff as the sheer number of people using the website brings things to a crawl. Spammers are legion as with all new tech, and the thought of people automatically seeing what you type instead of having to visit a dedicated website can be a little offputting. On the whole, however, it’s a Good Thing.

Let’s face it, if I had to fill this thing in every day, you’d get variations on the theme of “Got up, performed ablutions, did some work, ate, watched TV, went to bed” every single time.

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Categories: Blog Tags: ,

Computer Problems

March 12th, 2009 DD No comments

At some point in between feeding my Twitter addiction and getting a Poker website ready I decided to reformat my big computer after putting up with a few problems for a long, long time. Silverlight was bombing on me, Google Chrome was locking up (blaming Flash) and nothing really worked as it was meant to.

The initial reformat and reinstall went OK, but during the Windows Update->Reboot cycle I got a Blue Screen of Death and things went downhill from there.

My SATA refused to boot. Thinking this could simple be a corrupt MBR problem I booted from my XP CD into the recovery console, tried FIXMBR and FIXBOOT and restarted. I got the same problem – invalid system disk – an decided to reformat again completely. Two hours town the pan so far, but what the hey.

No deal – I still can’t boot from SATA, so I waded through the BIOS options, resetting to safe defaults and going from there, and still my SATA won’t fire up. I eventually removed the Work drive to a safe place and reformatted my backup drive – a 250GB PATA that’s normally in a removable mobile rack – to boot from. This went OK, and I installed Windows, Office and all the combined updates for both.

What’s annoying is that the SATA drives themselves are absolutely fine, mounting in Windows no problem – I just can’t boot from the damned things. I’ve tried all three that I own, two 120s and a 250GB, and they all respond the same. No booting.

I still needed a backup drive, so I plonked down £9.98 on a SATA mobile rack and reformatted the 250 SATA for use as a backup. The idea is that I copy all the files over from C: and D: (now partitions on the 250 PATA, rather than individual SATAs) using SyncToy 2.0 and yank it to store in a safe place. I originally had both my work drive and backup drive encrypted with TrueCrypt, but I just don’t want to push my luck right now.

So now I he a pair of 120GB SATAs sat doing nothing. I could possibly set them up in a simple striped RAID0 config so store my work on, then reformat the PATA as one big lump, but do I really want to go through all that hassle? It’s not as if I need the space.

Sigh… Bloody computers.

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

How to divide a list of results into pages in PHP

March 9th, 2009 DD No comments

There comes a time when a list of records output by a MySQL query becomes too long to realistically display on a single page, and the programmer wants to break it up into pages. It might be log activity, forum posts or whatever, but the principle is the same – we only want to view a manageable section of the entire record list.

Let’s assume we’re dealing with a set of forum posts in a thread. Your query would take a unique number for the thread ($threadId) and you would pull out a list of posts like this:

<php
 $postSQL="SELECT * FROM posts WHERE (THREAD=$threadId) ORDER BY ID";
 $posts = mysql_query($postSQL) or die(mysql_error());
 while($post=mysql_fetch_array($posts)) {
  // display posts here
 }
?>

This would return all of the posts for this thread in order of creation – ID being the master key for this table.

To split this into pages, we first need to decide how many posts we want per page. Once we have decided on this, we can see how many lines our mysql_query(), above, returns and calculate the number of pages. After that we can decide which page to show and calculate which posts go on that page.

Here’s the altered code:

<?php
 $postSQL="SELECT * FROM posts WHERE (THREAD=$threadId) ORDER BY ID";
 $posts = mysql_query($postSQL) or die(mysql_error());

 $postCount   =mysql_affected_rows();
 $postsPerPage=25;
 $pageCount   =ceil($postCount/$postsPerPage);
 $pageNum     =min(max(1, (int)$_GET['page']), $pageCount);
 $firstPost   =($pageNum-1)*$postsPerPage;
 $lastPost    =min($firstPost+$postsPerPage, $postCount);

 $posts = mysql_query("$postSQL LIMIT $firstPost, $postsPerPage") or die(mysql_error());

 while($post=mysql_fetch_array($posts)) {
  // display posts here
 }
?>

As you can see, we call mysql_query() twice now – the first time to get the total number of posts and the second time to get the subset of those posts once we have decided which ones we want. The highlighted green section shows what has been added, and I’ll go through them here:

$postCount =mysql_affected_rows();

Records the total number of posts returned. We need this so we can calculate how many pages we have in total using…

$postsPerPage=25;

This is how many posts we want on a single page. You can store this in a table for easy altering, or allow it to be overwritten from the URL so that users can decide on their own page sizes.

$pageCount =ceil($postCount/$postsPerPage);

The number of pages is the number of posts divided by the number of posts per page, and rounded up, so ‘30 posts at 25 posts per page’ would return two pages.

$pageNum =min(max(1, (int)$_GET['page']), $pageCount);

Slightly more tricky to read, this line limits the number of the page to be displayed between 1 and the total number of pages, taking into account any page number specified in the URL with ‘&page=’, even if a value is not given.

$firstPost =($pageNum-1)*$postsPerPage;

We need to know the record position – not the ID – of the first post so that we can tell MySQL where to start counting from. This number starts at zero whereas your ID would start at one.

$lastPost =min($firstPost+$postsPerPage, $postCount);

We don’t actually need $lastPost for anything in this example, but it’s nice if you want to display a message along the lines of “Showing posts 25 to 50 of 376″. This value is the actual ID of the last post on the page, so it starts at one and never goes above $postCount.

$posts = mysql_query(”$postSQL LIMIT $firstPost, $postsPerPage”) or die(mysql_error());

Finally we run your original SQL statement – here held in $postSQL – a second time but with our calculated limits applied.

VN:F [1.4.4_707]
Rating: 5.0/5 (1 vote cast)

Categories: PHP, WebDev Tags: , , , ,

Simple Fail

February 25th, 2009 DD 2 comments

Simple Wikipedia article on Simple is Simple Fail.

Simple Fail

Simple Fail

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Categories: Internet, Problems Tags: ,

Orange Mobile Contract Cancellation and Renewal

February 23rd, 2009 DD No comments

With my old £40/month Orange contract coming to an end I decided to give them a call and see what they could offer me in the way of customer retention.

Speaking to a nice Scottish lady (sorry Nice Scottish Lady, I didn’t catch your name!) we went through a few options and I eventually plumped for:

  • Free Nokia 6300
  • 300 Anytime Minutes per month
  • 100 Texts per month
  • Unlimited Landline Calls
  • £45 Account Credit

This amply covers my 100-minutes-a-month usage, though I may – may – go over the text allowance if I get carried away. Price for this package? £14-odd a month, so with the £45 credit there’s nothing to pay for the first three months.

I realise the included Nokia isn’t the most recent or even advanced of phones, but it’s the exact same phone that I have already and I’m perfectly happy with it. The new one will serve as a ‘just in case’ phone since I don’t have any form of insurance. Since I’m careful with phones anyway, there shouldn’t be a problem.

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Categories: Gadgets, Phones Tags: , , , ,