Archive by Author

Everything Must Change

5 Dec

It must be true – Quincy Jones never lies after all.

Change comes to us all – for some of us it means radically rethinking what we once believed to be true and for some of us it might mean rethinking something that has brought us fame and adulation.

For those that don’t know him Citizen Cain is a blogger who challenged David Kirby’s interpretation of the numbers as they related to a rise/fall in the rate of autism. Kirby claimed that the rate was falling. Citizen Cain showed him why and where he was wrong.

And for the first time, Kirby responded.

Understandably, Kirby doesn’t seem interested in mucking around in the data with me too extensively, or in answering my detailed questions. But in an e-mail, he did address the key point, and concede that “if the total number of 3-5 year olds in the California DDS system has not declined by 2007, that would deal a severe blow to the autism-thimerosal hypothesis.” He also conceded that total cases among 3-5 year olds, not changes in the rate of increase is the right measure.

I suggest at this point you go and read the rest of Citizen Cain’s post from which I quote above. The links to the associated posts where he discusses his email correspondence with David Kirby are on that page too.

But lets reiterate. Kirby is not only admitting that if the _total cases_ of autism doesn’t fall then the jig is up, he’s also admitting that up until now his interpretation (and the source for that interpretation – one Rick Rollens) is wrong. Why? Because as he admits after Citizen Cain showed him his errors, whats important is the _total cases_ *not* changes in the rate.

After I read Citizen Cains latest post, I had a little niggle at the back of my head – something Kirby had said this year. So I checked my references and there it was. In an interview with the New York Times, Kirby said:

Because autism is usually diagnosed sometime between a child’s third and fourth birthdays and thimerosal was largely removed from childhood vaccines in 2001, the incidence of autism should fall this year.

*This* year. Not 2007. Why has Kirby added on 2 years to his interview? This interview with the NYT was conducted before Kirby’s admittance that it was the total case amount that was important not the rate change but thats the only real difference in the two statements. Now maybe I’m missing something but what are the extra two years for?

As far as I can see, when one takes the admittance Kirby issued to Citizen Cain and applies the same criteria to it then it should be the end of *this year* that we should see changes. Big changes.

Everything must change. We have 26 days before we know whether that change is something that I and a lot of others have to address or whether its something David Kirby and his followers have to address.

A Means To An End

28 Nov

And so, the latest fire-storm in the autism blogosphere continues to rage. If you’re unaware of the story I’ll offer a brief recap (as unbiased as I can make it) before trying to offer up some commentary.

Briefly, JB Handley of Generation Rescue bought the domains supportvaccination.com, oracknows.com and autismdiva.com. Why? I don’t really know. On a practical level they can’t be doing him much good at all so one is left to consider the possibility that he did it as either a joke or to be spiteful. I sincerely hope that the team who is working on his search engine marketing hasn’t recommended that he does stuff like this as if they are then they’re moving him into the realms of what is termed as ‘black hat SEO’ – this refers to doing lots of bad stuff that is against acceptable internet policy to get a good rank on a search engine results page. The penalties for this can be severe if search engines catch you at it and include blacklisting the sites in question and terminating any associated AdWords accounts. From what I know of JB he loves to push the envelope a bit so I wouldn’t be surprised if he is doing this. He is playing with more fire than I think he knows about though.

Anyway, the unsurprising upshot of this is that most people on ‘his’ side of the debate think that a) his methods are questionable but seeing as he’s promoting such an important message the ends justify the means or b) that its downright hilarious. People on ‘my’ side of the debate (please note by using the phrase ‘my side’ I’m not assuming ownership of it) think that a) its all very childish and a bit sad or b) that what he’s doing is tantamount to willfully misleading people.

What are the definite results of JB’s actions? Well, he’s polarised two sides that were beginning to listen to each other a little better. He’s created a new battlefront where none existed before and he’s upset people.

Lets look at JB’s sides claims that even though his methods are questionable that its OK as the message he’s relating is so important the end justifies the means.

First, that is a very dangerous argument to apply to anything. If we call ourselves a society that has a moral base then ‘the ends justify the means’ is at best, ambiguous as a reason.

Secondly, lets look closely at what JB’s message actually is to see if it is indeed justifiable to use methods such as these. Lots of people, particularly JB’s supporters either don’t know or seem intent on ignoring JB’s message. It is this: autism is mercury poisoning. Not _may be_ , not _in some cases_ , not _might be triggered by_ but simply *is*. Now and forever. This is an absolutist position and its the main thing about Generation Rescue that I believe it is imperative to challenge. Why? Because autism is *not* only mercury poisoning. The vast majority of the information on the GR site revolves around the idea that thiomersal in vaccines causes autism. Lets leave the debate as to the scientific validity of that belief to one side for now. I’m quite happy to entertain the possibility that he may well be right. I’m equally happy with the science that as of this time, states that he is not. For my argument – its irrelevant. The fact is that even if JB is right and thiomersal does cause autism _it is not the *sole* cause of autism_.

Big deal say people – why does that matter? It matters because if that viewpoint comes to be accepted fact then the standard treatment for autism will become chelation. And seeing as it is a verifiable scientific fact that autism existed _long_ before thiomersal was ever used this would mean that there were a very large number of autistic children undergoing chelation totally unnecessarily. Question: Is it stupid or clever to subject children to unnecessary medical procedures?

The irony of this message is that it is a standard complaint of the mercury = autism belief system that they couldn’t get their Doctors to look beyond their narrow treatment options. This is _exactly_ what will happen should mainstream medicine ever accept the GR viewpoint that autism is mercury poisoning to the exclusion of everything else.

Let me reiterate once more – I have no issue with any group that calls for more investigation into the use of thiomersal in vaccines and that I’m glad that it is no longer in vaccines. I also fully accept that there are occasions that vaccines have damaged children. I also fully accept that mercury is a known neuro-toxin. What I do not want however, is for my daughters treatment to be a) enforced and b) an unnecessary and dangerous procedure when there is no basis for such absolutism.

So I ask you again Dear Reader – is JB’s absolutist message so good that it justifies his actions? Lets not forget that his actions also include name-calling (JB referred to friends of mine as ‘trailer dwelling coo-coo’s’ and me personally as a ‘wanker’ – a phrase for the non Brit-slang understanding amongst you that means that JB believes I masturbate to excess – roughly equitable to ‘jerkoff’ in US parlance I believe). This is as well as buying up domains that belong to sites that disagree with him.

Many claim that JB has apologised (although I fail to see where he apologised to me) and thus should be forgiven. I agree and disagree with that. I agree that for the debate to progress we all need to forgive and move on. However, this is not a one-off circumstance for JB. This is his MO. At some point, we have to stop making allowances and start holding people to account.

That said, up until this incident, I believed JB’s latest apology was sincere. I still hope it was.

People have also referred to JB’s behaviour as a bull-in-a-china-shop and expressed admiration for his go-get-em approach. I can’t see how such an approach is particularly admirable. Bulls loose in china shops breaking everything indiscriminately and certainly I feel less sure of the shaky common ground that had just started to be secured between the two sides. Lets also not forget _my_ message: that autism is not solely thiomersal poisoning and that bulls loose in _that_ particular china shop run the risk of doing very great damage to the delicate objects inside it.

Now lets move on to the point about upset. People from JB’s side of the debate cannot seem to understand why this action has upset Camille so much. As she is very much smarter than me she doesn’t need me to speak for her but I do wish to add my opinion as to why whats happened might cause her distress.

As a blogger who comments particularly on the science behind the debate she stands or falls on the accuracy of that science. If anyone was misled into thinking she endorsed the GR view then that person may well have further doubts about her validity. I hesitate to speculate as to whether or not that might be one of the reasons JB did it of course.

Secondly, there is an issue here of implicit control. An ugly image is called to my mind of a rich businessman laughing uncontrollably at the image of a less affluent woman as he dangles her on puppet strings. Fanciful? Yes. Exaggerated? No doubt. Based in some element of truth? I’m afraid I think it is.

Thirdly, again, lets look at the GR message and think about why those who are autistic particularly might not want to be associated with it. They believe GR is wrong. Further though, they see GR reducing who they are to a set of mercury related symptoms. Lets not forget that GR believe that autism is *only* mercury poisoning.

Once upon a time (in fact less than 40 years ago) psychologists ‘knew’ that homosexuality was *only* an illness that could be ‘cured’. How do you think that – at the time – that made gay people feel? Imagine a blogging community of parents desperate cure their gay adolescents (who ‘know’ that their children are just ill) – would gay adults be horribly offended and fight back? Or would they sit on their hands and do nothing?

For us parents, the outcome of this debate is very important – our kids depend upon it. For those people who are autistic, the outcome of this debate is absolutely crucial. Their continued survival depends upon it. I ask you once more: in an area of such vital importance, is the method really unimportant when the method denigrates so much? Is it something to be brushed aside as we smile indulgently at its instigator when its tantamount to an attempt to control a debate that affects peoples very right to exist?

Is this message so right that such a total lack of respect for a differing view is at best readily embraced and at worst tolerated in the way we would tolerate a favourite but slightly spoiled child?

Rashid Buttar Recommending IV-EDTA Based ‘Therapy’

22 Nov

Orac has a long and incredibly worrying post up that reveals that Rashid Buttar, chelationist supreme, has taken a very worrying step down the road to quackery.

A few months ago, a 5 year old autistic boy died undergoing chelation therapy. Defenders of chelation at the time pointed out that IV EDTA was not a recognised treatment for autism chelationists.

However, that form of chelation therapy is exactly the sort of therapy that Rashid Buttar is apparently now implementing as part of a new protocol.

Why? Defenders of Rashid Buttar claim that he promotes his own TD DMPS because its safe – a lot of us think its safe because it doesn’t do anything. So why would he switch from a chelator specifically marketed and lauded as ‘safe’ to one that is associated with the death of a child?

I find Rashid Buttars role in the whole damn thing puzzling – he claimed he didn’t have time to submit his TD DMPS for independent review as he wanted to spend his time helping kids. Thats a bizarre bit of logic when you consider that if he _did_ submit TD DMPS for peer review and it was successful (ahem) then he would be in a position to reach a hundred, no a _thousand_ times as many kids. And now this. A bizarre and frightening step backwards to using a technique that is outdated amongst legitimate chelators – in the field of autism its notoriety is ensured with the death of a small autistic boy.

And its not only IV EDTA – apparently this new protocol utilises Ozone…..why? There’s no science that suggests this is a good idea and Orac’s piece has a frightening description of what Ozone can do and how it seems ‘Dr’ Buttar is overriding known safe doses – something of an irony considering his most vocal supporters claim that its an overdose of a known safety limit thats caused what he claims to be treating.

Most worryingly of all, it seems that Buttar is _already_ using these methods. Last time a lot of us expressed unease and worry about the end result of chelation for autistic children. It looks like thats what we’re reduced to doing again. I’m sure his defenders will find some way to rationalise it but I’m left simply hoping Orac’s information is wrong and that even Dr Buttar wouldn’t be so foolhardy. Of course, simply hoping didn’t do a whole lot of good last time, did it?

Web Professionals: Who We Are Or What We do?

17 Nov

The big topic doing the rounds at the moment is the topic of professionalism for web designers/developers. The gist of the argument centers around a remark made by Andy, in an interview on Accessifywho said:

I believe that the time has now passed for those working with old fashioned methods to be called web professionals.

This lit something of a blue touch paper and prompted a flurry of blog posts. Molly said::

The essence of this new professionalism isn’t about being perfect at what we do. It’s being able to say: Hey, I don’t know that. Let me go find out.

And Roger said:

Web professionals who refuse to update their skills and insist on using outdated methods can no longer be called web professionals.

Strong words and words that are difficult to disagree with. Roger was worried that he would be accused of being elitist for saying them. A long time ago (in a thread I can no longer find) I espoused similar views and was called an elitist. What I failed to make my accuser understand was that its not about creating an elite, its about creating a level playing field where _everyone_ has a core set of competencies.

Jeff added to the debate today stating his belief that higher education is the answer – or at least the stumbling block.

Its a good point – there needs to be an educational response to this issue but its not enough. Lets look at the word ‘professional’ for a moment:

  1. Of, relating to, engaged in, or suitable for a profession: lawyers, doctors, and other professional people.
  2. Conforming to the standards of a profession: professional behavior.
  3. Engaging in a given activity as a source of livelihood or as a career: a professional writer.
  4. Performed by persons receiving pay: professional football.
  5. Having or showing great skill; expert: a professional repair job.

Dictionary.com

When we say that those who don’t use the latest techniques can’t be professionals, which definition are we using? The closest is possibly no.2 but as that is a continually evolving thing in our profession thats tricky. At least two definitions pertain solely to the fact that a professional can be considered professional solely if they make money from their chosen profession.

Not easy is it? What we mean by professional is really – someone who designs and build websites in a way we agree with. When enough people agree then we have a standard. Simple. Or it would be if it were not for the example of IE – by that logic IE is the standard we should adhere to for coding ambiguities.

The quotes I made above seem to indicate that the ‘stripping’ of the phrase ‘professional web developer’ from some FrontPage jockeys status would matter two shits to him/her. I’m guessing they couldn’t possibly care less. As long as they continue to get paid, they’ll continue to do their work as quickly and cheaply as possible. If you’ve ever bought your furniture from DFS or Ikea instead of having it handmade by a professional furniture designer I’m sure you can appreciate why the’d do that.

A year ago, I wrote two posts that touched on this issue. The gist was that the community doesn’t need more education – everyone from the lowliest FrontPage hacker to the highest standards purist knows there’s a shit load of information out there and how to find it. Its choice that makes the difference – which I think was the essence of Molly’s post.

The fact is that there is a sizable majority that are quite simply _choosing_ not to get involved. For whatever reason. We need to counter that with an accreditation scheme. Plumbers need to be certified, so do mortgage brokers and travel agents. I think web designers/develoeprs need to be too. Business people are far more likely to work with people who have a visible proof of a certain level of ability – if we made the accreditation revolve around modern web standards then we’re laughing.

Cure Is A Four Letter Word.

14 Nov

But then again, so is ‘love’.

Do you know what? I’m tired of fighting with people. I’m coming off the worst flu I’ve had for nearly 6 years, my wife’s had it, our kids have all had it and I’m physically, emotionally and motivationally drained.

All I wanted when I started this was to document my autistic daughters progress, make the odd little web development post here and there and stand up for what I believe is right. What I believe is right is that autistic people should be respected. I believe society should change to accommodate difference. In the same way that women are equal to men, people of different cultures and creeds are equal to the dominant population in whichever country you live in, senior citizens are as important as young people, homosexuality is as normal (whatever the hell that is) as heterosexuality – people with a different neurology *irrespective of its cause* are just as valid and deserving of rights, consideration and an equal voice as those of us with a typical neurology.

_Is that really so difficult to deal with?_

Autism is not a childhood condition. It first _occurs_ in childhood. Take a look around you. Read the reports. Study the science. Examineour history.

Look, I’ll give you this – its entirely possible autism could be caused by mercury. In some cases. But please try and _think_. All the Amish in the world don’t add up to an autism/vaccine epidemic. All the recovered children in JB’s PDF’s and Erik’s AVI’s don’t add up to a cure.

Why? What is it you think you are curing? If your child doesn’t smear, or headbutt or have constipation – does that mean they are not autistic? _No_. It means they’re not constipated or headbutting or smearing anymore. If thats your child then I offer you my sincere congratulations. I don’t want your child to be in pain any more than I want my child in pain. But I would urge you to be very careful – your child almost certainly still thinks and interacts in ways that are very different than you do. Would that be enough justification for you to carry on ‘curing’? If so, why?

Ginger presents the best argument of all. She says that if a child is likely to grow into an adult that cannot communicate their needs – especially when that person is in danger – then it is worth it to attempt a ‘cure’. And she certainly has a lot of very good evidence that autistic people are routinely abused.

I have no easy answer to this argument. When I read it, I’ll freely admit it, I want to remove everything that threatens my daughter. But is that right? In one way its absolutely right – every parent has a duty to keep their kids safe.

But, I agree with Susan Senator who said:

The “must eradicate” attitude drives parents to be nothing but nutritionists, behaviorists, and therapists, for their children. These parents, however motivated by doing their children good, end up spending most of their parenting time trying to subjugate aspects of their children.

No child – of any neurology – can be kept 100% safe unless you want to take them and wrap them up in cotton wool. Pre-empting Ginger, I think she’d say that this isn’t a case of wrapping them up but of giving them every chance to be independent enough to recognise danger and be able to do something about it. Certainly when I read some of what Amanda Baggs has had to endure at the hands of ‘carers’ my blood boils and my heart quails.

But. I believe that autism is not the cause of this misery. Attitude is. Institutionalised and abusive staff are. The non-recognition of autistic people as having a valid existence causes these attitudes to grow. When someone says ‘all autism is mercury poisoning’, that is essentially taking someones existence and traducing it as poison and invalidating it as viable. As can be seen from the links provided – thiomersal cannot be responsible for all cases of autism. Autism existed before thiomersal. Thats simply a fact. To deny it is not only bizarre it is akin to taking someone by the scruff of the neck and telling them that because they are ill, they are not fit to make decisions and thus abuse is legitamised and around and around we go.

I don’t expect anyone who believes autism is mercury poisoning to give up on their idea. What I am asking is that you can try and at least meet those of us on the ‘other side’ halfway. Try and understand that painting everyone with one brush is tantamount to little more than bigotry. I asked JB once to recant just one aspect of his belief – that all autism is mercury poisoning now and forever. I ask him again, with all respect. If you are an advocate for autism then please try and see that in this one respect you are wrong. All autism is _not_ caused by thiomersal. This isn’t a game. Nobody’s keeping score. I’m more than happy to entertain the possibility that for some children who have become autistic that there is an environmental trigger. If there is ever science that conclusively demonstrates a causative link I swear to you that I will be as vocal in going after the guilty as I am now in going after people like Rashid Buttar. As I say, what I ask in return is that you _see_ that you truly look at the world of autism beyond your child. Look without melodrama and look without preconception. I am deathly afraid that one of the things you are doing is making the world for autistic people less safe. You’ve seen some of the things that a certain Rescue Angel of our mutual acquaintance has written here. JB himself expressed unease at what this person had said. Do you think that such a person is interested in advocating _for_ autistics?

Some people think that if you can communicate you cease to be autistic. Again, I see that as a willful and purposeful denigration of people who’s crime seems to be that they can communicate – the punishment is excommunication from who they are. Invalidated people. And for what? Why would anyone think such a thing? As Tolkein said: “what can we do against such reckless hate?”.

At the core of who I am is a belief in personal responsibility. I take responsibility for who I am and what I do. I believe its the cornerstone of what makes us free people. I will do everything I can to ensure that my kids all have that same belief. We have a duty to our society as well as our children. And society has a duty to us and them. Everything in life works better when its driven by reciprocality. I say society must change for the good of all our children _and_ adults as well. I reciprocate by doing my best to raise self-aware, self-confident children to adulthood. I cannot do that if who they are is withdrawn from them on the basis of political need. I don’t try and stop you from curing (if thats the word you choose to use) your kids. All I ask in return is that you stop insulting mine. If you are right and thiomersal causes autism then I will fight beside you. Will you fight beside me if I ask you to advocate _for_ autistics, instead of _against_ autism? Can you turn some of that energy and anger I see in chatrooms and blogs directed into action to enhance the lives of adult autistics? Can you do it without talking about mercury?

I’m not asking you to change your beliefs. We both know you don’t agree with mine and I don’t agree with yours. But there should be lots we can agree on. Can we?

E-commerce With PHP: Creating Unique Download Areas

10 Nov

I’ve posted a few snippets from the client-side that have touched on a project I’ve been working on recently. This project is an e-commerce based website that takes a payment (via WorldPay) and then generates a download of the product the shopper has just purchased.

Offering paid-for downloads via the web is a tricky proposition. There are lots of security factors that need to be considered. You don’t want your product to be actually on the webserver for example as its possible for someone to stumble across it and download it. On the other hand, you don’t want to make it very difficult for a user to get to the right place to download their product from – that would defeat the whole point.

The product we’re downloading is approaching 60mb in size so we have another issue – that PHP doesn’t handle downloads of big files very well. So we need to find some way of making sure PHP doesn’t choke.

Further complicating this particular solution was the fact that WorldPay doesn’t offer a ‘download’ solution – it only offers solutions for objects that are sent offline (books, CD’s, clothes, whatever) so I was limited in that respect.

The whole process is complicated. The shopper fills out their details (name, billing and shipping address, email, tel etc) on our site. These details first get input to our database and then get sent to WorldPay along with a unique id for this purchase. The shopper then fills out their card details which WorldPay then process. If the transaction is successful then a variable called ‘transStatus’ is set to ‘Y’. If its declined its set to ‘C’. This variable is sent via POST to a callback script which sits on our server (this part of the process is invisible to the shopper). The appropriate markup is generated via this callback script and sent back to the shopper at WorldPay. Part of this generated markup (assuming a successful transaction) includes a link with a variable appended to it (the unique id for this purchase) which points to a script back on our server. When the shopper clicks this link they get returned to our server and the download process starts in earnest.

At this point the script needs to do the following. First, it needs to compare the sent back value to a value in the db and pull out the purchase details that apply to that value. It then needs to generate a unique serial number (quick side note: this is returned to my script via an XML-RPC script that connects to a Java web service one of the developers wrote). It also needs to create a PDF invoice (quick side note no. 2: I used the rather marvelous R & OS PDF Class to generate the PDF).

What it also needs to do is create a new directory, copy a file from an old directory to this newly created directory and then send the newly created URI to the user. As a point of interest, you should note that the file that is being copied is _not_ the downloadable file. As this is over 60mb in size it makes no sense to copy this across for every shopper. Instead we copy across a very small file that triggers a download of the downloadable product file. OK so first of all I uploaded the downloadable file _and_ the file to be copied into a directory _above_ the web root, thus ensuring they can’t be browsed to. I then set about creating the PHP to store the download script:

$oldPath = "/home/somedir/";
$filename = "myscript.php";

So, first we set two variables; the path to the directory above the web root that contains the download script and the name of the download script itself.

if (file_exists($oldPath . $filename)){
	
		$mdy = date("mdy");
		$hms = date("His");	
		$rightnow = $mdy.$hms;
		$dir = md5($rightnow);		

Next we open a check to ensure the file exists,r eferencing the two variables we set up first. If the file _does_ exist then we create a fairly random string of letters and numbers by taking the current date, current time, appending them together (no spaces or punctuation marks) and then hashing them using the md5() function. This pretty randomised string of letters and numbers will be the name of the directory we’re going to create.

$newDir = "/home/somedir/public_html/dowmloads/" . $dir;	
mkdir($newDir, 0777);

So here we actually create the new directory – first we use the new name and append it to the location we want the new directory to live in and then we do the actual creation using mkdir(). Note that we set the access rights to this new directory in the second parameter of the function.

$newLoc = $newDir . "/" . $filename;		
$oldLoc = $oldPath . $filename;
			
copy ($oldLoc, $newLoc) or die ("Could not copy file");	
$uri = "http://www.blah.co.uk/downloads/" . $dir . "/" . $filename;

echo $uri;

Next we create two variables which contain a string referencing the new and old locations (i.e. where the file to copy exists now and where we want it to be copied to) and we then go ahead and actually copy the file over.

After that its a simple case of building the URI from a string and then doing what you want with it. Your original file (myscript.php) will now have been copied into the newly created directory. Just put an ‘else’ clause in to tidy up and the code in full is:

$oldPath = "/home/somedir/";
$filename = "myscript.php";

if (file_exists($oldPath . $filename)){
	
  $mdy = date("mdy");
  $hms = date("His");	
  $rightnow = $mdy.$hms;

  $dir = md5($rightnow);		
  $newDir = "/home/somedir/public_html/dowmloads/" . $dir;	
  mkdir($newDir, 0777);
		
  $newLoc = $newDir . "/" . $filename;		
  $oldLoc = $oldPath . $filename;
			
  copy ($oldLoc, $newLoc) or die ("Could not copy file");	
  $uri = "http://www.blah.co.uk/downloads/" . $dir . "/" . $filename;
		
  echo $uri;
		
} else {

  echo "Uh-oh, it went bad.";

}

So what about the file ‘myscript.php’? What does this do? Well, its there to actually grab the file that needs to be downloaded. Using lots of small files instead of lots of large ones makes a lot of sense. It also means we can script solutions for large files.

$filename = "/home/somedir/myprogram.exe";
$filename = realpath($filename);

if (!file_exists($filename)) {
 die("NO FILE HERE");
}

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename="".basename($filename)."";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".@filesize($filename));
set_time_limit(0);
@readfile("$filename") or die("File not found.");

The first two lines are straightforward. First create a reference to where the file to be downloaded resides. then use realpath() to get the absolute path. Now, after that we perform a simple check to ensure that the file is there. if not, error out. If yes, then proceed.

The interesting bits of this script are the Header declarations. These are necessary for various thigns to make sure the download is fetched properly.

header("Pragma: public") works with header("Content-Disposition") as a known issue with IE6 is that the filename attribute of Content-Disposition is not always recognised. Using Pragma: public resolves this.

Cache-Control: must-revalidate and Cache-Control: private, falseensures the file is never cached.

Content-Type: application/octet-stream is the content type for application files and Content-Transfer-Encoding: binary ensures the correct transfer type is used (binary in this case).

The all-important line here is set_time_limit(0);. The time limit refers to the amount of seconds that PHP allows a script to execute. The default is 30 seconds which is obviously no good for a 60mb file. By setting the time limit to zero we set no upper limit on script execution time.

Lastly, we use the readfile() function to actually start the download off. Job done.

Curious Search Terms

7 Nov

Every so often I amuse myself by trawling through the search terms people use on Google, yahoo etc to find their way here. Some of them are fairly obvious – I rank pretty well on autism and web related terms.

However I occasionally find some downright bizarre or otherwise funny terms. Some of them are so odd I simply can’t figure how any engine returned my site as a match. I thought what I’d so was to share some of the more odd phrase that turn up in my web logs on occasion.

can ingesting mice urine make humans sick?

Pure genius. This is one of those great questions that answers themselves. Simply remove the ‘Can’ and the ‘?’.

quack jeff bradstreet quack

OK, I agree but the funniest thing about this is the mental image of someone shouting “Quack Jeff Bradstreet, quack!” in some sort of demented orgy of duck-related flagellation.

ipods cause autism

I must admit that a mouthful of tea very nearly hit my monitor when I first read this. I feel sure that in the coming months we will see a rise of parent-lef groups campaigning to rid the world of evil MP3 playing devices. ITS THE MUSIC PLAYERS, STUPD!!

stop the pigeon

I loved that cartoon. Second only to Pinky and the Brain. I have no idea how it ended up in my web logs though.

play extremist deth

??? Are ‘extremist deth’ a group? Some kind of sick board game? It sounds like some sort of Metallica/Napalm Deth offshoot to me.

theres a voice keeps on calling me! down the road thats where i ll always be!!!

I frigging hated the Littlest Hobo. Sorry America. But this was such a surreal phrase to turn up in my web logs that it kept me giggling for hours.

naughty policewoman

Er…OK. There’s only one guy I know of who hangs about with Strippers and lap dancers (its his job the lucky git). I promise I don’t keep any ‘naughty policewomen’ related imagery.

Not on my web server anyway.

nicest ass in the internet

Heeyyyy…..thanks unknown searcher. Seriously though? I really doubt it. I’m large, shambling, hairy with wild eyes etc. And _in_ the internet?

how to say subjcts in french

I love irony as much as the next man.

powerpoint noise induced hearing loss

One of my personal favourites. Is there a support group for people who’ve lost their hearing due to Powerpoint related noise? If not, there really should be. The suits I know love to put swishy noises on there terminally dull presentations. Possibly someone got carried away in an apocolyptic cacophony of MS-plinky action noises.

how do i speak to my dead husband

OK now, I try not to be cruel but I defy anyone not to think wicked thoughts. Its not so much that this person wants to speak to their dead husband so much as she _searched the internet_ looking for sites to tell her how to do it.

And thats it for my web logs – got anything amusing, odd or downright peculiar lurking in your search terms?

Two Little Snippets

7 Nov

Part of my continuing quest to use Javascript in responsible, degradable ways is documented below.

I’m coming to the end of a development period that involved building an e-commerce solution and sign up procedure. I saw two possible uses for some nice unobtrusive Javascript here.

In the first example (and this is one is very simple indeed) I wanted a way to have a value in a form field as per WCAG 1.0 guidelines dictate. However, whenever I see these implemented, the author fails to clear the form when the field in question gains focus meaning a user has to manually clear the placeholder value themselves – something of a pain. The solution in this case is as simple as:

window.onload = function() {
	if (!document.getElementById) return false;	

	var e = document.getElementById("email");
	e.onfocus = function() {
		e.value = "";
		return false;
	}	
}

And the markup:


So, the Javascript first checks that the function we need is supported by the browser. If its not then thats that – it won’t work but nothing is visually affected and no error alerts will appear. The worst case scenario is that the user muse clear the field manually.

If getElementByID() _is_ supported then we declare an onfocus() function that clears the value – and thats that. Job done.

My second idea was to aid the process of filling out address details. In most cases when you are buying from an online shop you must specify and billing address _and_ a shipping address. Obviously, its easy to grab the values of one set of fields and marry them up with another set but all the solutions I’d seen had no non-js fallback position and most had loads of JS attrtibutes in the markup which is something I really want to avoid. So, first lets look at out form:

	

	

		<h2>Billing Address</h2>
	
		Address
		
		
		
		
		
		
		
		
		Town
		
		
		County
		
		
		Post Code
		
		
		Area
		
  		  United Kingdom
                  Australia
                  Belgium                     
                  Canada
                  Denmark
  		  France
                  Sri Lanka
                  Venezuela
                  Zimbabwe
				
			
		<h2 id="addLnk">Shipping Address</h2>
	
		Address
		
			
		
		
			
		
		
			
		Town
		
			
		County
		
			
		Post Code
		
			
		Area
		
			
	
	

*NB: No, thats not the whole form, this is just the bit we’re interested in.*

Now, what I wanted was an easy way for the billing address details to be copied to the correct shipping address sections but if the user had no JS then to leave the form exactly as it was. Here’s what I did:

window.onload = function() {
	if (!document.getElementById) return false;
	if (!document.createElement) return false;
	if (!document.createTextNode) return false;
	if (!document.getElementsByTagName) return false;

	var h = document.getElementById("addLnk");
	var p = document.createElement("p");
	var a = document.createElement("a");
 	a.href = "#ready";
	a.className = "ditto";
 	a.appendChild(document.createTextNode("Shipping address is the same as the Billing address"));
 	h.appendChild(p);
	p.appendChild(a);

	var z = document.getElementsByTagName("a");
	var x = document.getElementById("buyFrm");
	for (var i=0; i<z.length; i++) {
		if (z[i].className == "ditto") {
			z[i].onclick = function() {
				x.sh_add1.value = x.add1.value;
				x.sh_add2.value = x.add2.value;
				x.sh_add3.value = x.add3.value;
				x.sh_town.value = x.town.value;
				x.sh_county.value = x.county.value;
				x.sh_pcode.value = x.pcode.value;
				x.sh_area.value = x.area.value;
				return false;
			}
		}
	}
}

The first four lines check that all the functions we need are available in the users browser. If they're not then nothing gets executed, nothing happens and the suer has the markup above presented to them.

The next section firstly looks for an element with an id of 'addLnk' (look in the markup above for it) and when it finds it, it dynamically creates then appends the following bit of markup:

Shipping address is the same as the Billing address

The link to ‘#ready’ simply moves the user down to the submit button (not shown in the above markup) for another added usability wrinkle. The meat of what this link does is triggered from the class ‘ditto’. Take a look at the last section of Javascript. This basically says that when a link with a class name of ‘ditto’ is clicked then copy the contents of one set of fields to the other. And thats it – job done here too.

These are both very simple bits of scripting but I hope they demonstrate real world practical use but executed in a way that ensures that the code is graceful in its degradation, accessible and separate from the semantic level.

Andrew Wakefield: Beginning To Regret Libel Case?

6 Nov

There’s new legal paperwork up at Brian Deer’s personal site. It reveals some very interesting facts about two things: First that Andrew Wakefield is instructing his legal team to use his Libel action against Brain Deer as a ‘gagging order’ and secondly that Andrew Wakefield is obviously getting extremely nervous about the effect his GMC hearing will have on his Libel case.

There are three separate actions involving Andrew Wakefield and Brian Deer. One is between Wakefield and the Sunday Times, the other between Wakefield and Brain Deer personally (in respect of his website) and a third one (the one under discussion here) between Wakefield and Channel 4/Twenty twenty Productions.

The ruling judge in this case first said that it was certain that the outcome of just one of these actions would determine the outcome of the others as all three rest on the exact same subject matter. [edit – not sure I got that exactly right – if anyone reads it and comes to a different conclusion, please let me know]

Andrew Wakefield has applied for a ‘stay’ in this case (the C4/2020 one). This means he essentially wants to put this action ‘on hold’. He wants to do this because he claims that the GMC case has seniority over this one. Justice Eady remained distinctly unimpressed with this argument:

In the light of this timescale, it is impossible to envisage the trial of these libel proceedings taking place before the Michaelmas term of 2007. Much of the evidence relating to the issue of justification relates to the mid-90s and a delay of that kind would be plainly undesirable. It would, moreover, involve a gap of three years between the broadcast in question and the trial. That is beyond what is normally regarded as acceptable in the modern climate for the span of a libel action between publication and trial – even in a complicated case…

In British law it is part of the case to consider that a Libel action should be acted on as hastily as possible as the defendant may have good need to clear their name – people like Brian Deer for example who, as an investigative journalist, needs to be trusted to be employable.

So why would Wakefield wish to grant a stay to after the GMC hearing? Because he wants to ‘test the water’ with the GMC action which at most can strip him of his license – a minor inconvenience for one who’s already making a living in Texas – whereas a libel action can strip him of a hell of a lot more. I’m guessing that when things go bad for him and the GMC strip him of his license that all other actions will be quietly dropped.

However, even though he has asking for a stay of this particular action Andrew Wakefield is not above using it as a weapon to browbeat people:

These factors loom even larger in the present case in the light of certain conduct on the Claimant’s part which Miss Page has prayed in aid. It is her case that *the Claimant is seeking to take full advantage of the fact that he has issued libel proceedings while avoiding any detailed public scrutiny of the underlying merits*. In other words, she argues, he is seeking to adopt a strategy comparable to that generally characterised by the phrase “a gagging writ”. It is necessary to consider these allegations in a little further detail.

A few of you may remember that Wakefield took part in their original Power of Parents rally in the US during which he read an extract of a statement in which a small British paper (the Cambridge Evening News) backed down from a report it had made about Wakefield. Obviously the American parents lapped it up to riotous applause. However, what had _actually_ happened is that Wakefield had instructed his legal team to threaten the Cambridge Evening News with an action like that he had over the Sunday Times:

“You should be aware that proceedings in defamation have already been commenced against The Sunday Times in respect of the article published by Mr Brian Deer on 22nd February 2004. Your article has gone even further than the allegation in The Sunday Times which are currently being litigated and allege impropriety on the part of Mr Wakefield to receive money from lawyers to achieve a predetermined outcome.”

Justice Eady took exception to this:

In my view that paragraph was misleading. Mr Browne (Wakefield’s QC) argues that, even if the circumstances had been set out more fully and accurately, it would have made no difference to the outcome. The editor would still have acknowledged that he had got his facts wrong. That may be, but the important point at the moment is that the editor was given a misleading impression. Because of the stay, to which I have referred, the allegations in The Sunday Times were certainly not “currently being litigated”. They were stayed pending the outcome of serious allegations of professional misconduct against the Claimant, to which no reference was made. It thus appears that the Claimant wishes to use the existence of the libel proceedings for public relations purposes, and to deter other critics, while at the same time isolating himself from the “downside” of such litigation, in having to answer a substantial defence of justification.

And there’s more: Dr Evan Harris MP had criticised Wakefield on a radio programme. He also got a letter:

“[Mr Andrew Wakefield] has asked us to inform you that defamation proceedings have been instituted against Mr Brian Deer and The Sunday Times newspaper in relation to articles that have been appeared [sic] and statements that have been made by them which are defamatory of [him]………..Mr Wakefield has drawn our attention to a number of statements made by you in connection with Mr Wakefield and the question of MMR both in newspapers and in BBC broadcast programme……Given … the fact of litigation having been instituted in defamation and the existence of the General Medical Council inquiry we hope you will agree that further comment on Mr Wakefield’s conduct by you or anyone else should be limited until the outcome of those proceedings has been determined. This will avoid Mr Wakefield having to consider further legal proceedings at the present time”.

Justice Eady took a grave view of this too:

I regard that as a threat that libel proceedings will be issued against Dr Harris unless he “limits” any further comment – not in itself objectionable. On the other hand, the threat is backed up by reference to litigation against The Sunday Times and Mr Deer which, by the date of the letter, had already been stayed. The implication is that for rather vague “sub judice” reasons it would not be appropriate to comment until the proceedings have been determined. At that stage none of the libel actions was “active” within the meaning of the schedule to the Contempt of Court Act 1981 and there was accordingly no reason why Dr Harris should not comment further, if he wished to do so, subject always to the constraints of defamation. Again, one sees the same pattern. The Claimant wishes to use the proceedings for tactical or public relations advantage without revealing that they have been put on the back burner.

And, incredibly, Wakefield also instructed his team to go after the Dept. of Health:

“…In the circumstances Mr Wakefield is concerned and surprised to note that your official website on behalf of the Department of Health offers links not only to Mr Deer’s own website, but also the Channel 4 website on the programme. It seems extraordinary to us and wholly wrong that the Government’s official organ should direct website visitors to another site which not only records partisan and hotly disputed opinions on the subject but is also the subject of defamation proceedings. You will appreciate our grave concern that this fact appears to suggest that Government offers this subject matter official weight and authority.”

This letter is intended to provide formal written warning that the links provided to these two websites are allowing the dissemination of defamatory material. Since this is so you are now invited to withdraw the Department of Health link to these two websites forthwith given that this is an inappropriate use of Governmental weight and authority in such a controversial area”.

Just as a side note I find it incredible that anyone should try and go after a website which links to Brian Deer’s. For their further legal presumption I’d like to present a list of sites that link to Brian Deer’s. I await your issue of a writ against Wikipedia and Google with interest.

Anyway, back to Justice Eady:

I am quite satisfied, therefore, that the Claimant wished to extract whatever advantage he could from the existence of the proceedings while not wishing to progress them or to give the Defendants an opportunity of meeting the claims. It seems to me that these are inconsistent positions to adopt. This conduct is a powerful factor to be weighed in the exercise of the court’s discretion in circumstances which are clearly unique.

And indeed so powerful that Justice Eady ruled that:

I have come to the conclusion, bearing all these considerations in mind, that the interests of the administration of justice require that the Channel 4 proceedings should not be stayed pending the outcome of the GMC proceedings. I appreciate that there will be an increased workload for the Claimant’s advisers, but I do not have any reason to suppose that the firm is incapable of absorbing that extra burden. It is, after all, their client who chose to issue these proceedings and to use them, as I have described above, as a weapon in his attempts to close down discussion and debate over an important public issue. (I note that separate teams of counsel are instructed for the GMC proceedings and the defamation claims.)

So far as the website proceedings are concerned, I see no advantage in those continuing in parallel. There is a significant overlap. I am persuaded that this overlap is so significant, in relation to the defamation proceedings (unlike the GMC disciplinary process), that the outcome of the Channel 4 proceedings is likely to be in practical terms determinative of the others. Mr Deer acts in person in the website proceedings, and a very considerable burden would be placed upon his shoulders if he had to progress that litigation in parallel to the other action, in which he has the advantage of legal representation. Indeed, it may well be that there is a whiff of tactics in the Claimant’s change of stance, whereby he wished to have the website proceedings continue – but only provided there was no stay of the Channel 4 litigation. This is borne out by the suggestion that, before the Claimant should serve his reply, Mr Deer should be obliged to serve a defence in the website proceedings. That proposal has all the hallmarks of a tactical ploy to put Mr Deer at a disadvantage. It would have the effect of isolating him. I am not prepared to go along with that.

Its not looking good for Andrew Wakefield. He’s now been exposed as a bully who likes to threaten with what he has no intention of pursuing. He’s also looking like he’s beginning to realise that he has no chance of escaping the GMC hearings unscathed. Hopefully all those who like to bandy around legal action as a threat will see that a hot head often gets regretted when the facts are examined.

A New Blog In Town

27 Oct

Its not often I feel compelled to write a whole entry just for the creation of a new blog but every so often one pops up by an author that you know is going to have an impact. I’ve ‘known’ Hurricane (its up to you to tell you his real name if he so desires) for a couple of years mostly meeting at an online cesspit of debauchery and web design that I keep forgetting to go and revisit.

To put it plainly and with all false modesty aside, ol’ H is smarter than a bag of spanners at the technical side of things like accessibility, standards and CSS. In fact he cares so much he’s fully prepared to (sort of) launch his new blog in an unfinished state presumably so he can further the concept of a live re-design to a live _start up_ .

Already, H has posted some good stuff. Hopefully thats the start of a long blogging career established.

I recommend adding his feed to your feed reader and paying a visit. And maybe you should go leave a comment too – if only to tell him that he may want to rethink the grasshopper imagery ;o)

Memo to self: fix the height problem that makes smaller entries look crap without comments.