Here is a copy of the Recurring Payments Include file that I've added a function for cancelling profiles: profileCancel()
It can be used like this:
<?php
$accountInfo = array();
$accountInfo['USERNAME'] = "API_USERNAME";
$accountInfo['PASSWORD'] = "API_PASSWORD";
$accountInfo['SIGNATURE'] = "API_SIGNATURE";
$cancelProfile = profileCancel($accountInfo,$_SESSION['profile_id']);
?>