if(isset($_GET['date'])){
$weekdaynumber = date("w", strtotime($_GET['date']));
} else {
$weekdaynumber = date("w");
}
echo $weekdaynumber;
Of course, you want to build in some error checking in case the variable isn't set. In this case, it echos the day of the week for today.
You also probably want to build in some error checking to make sure the date variable is in the right format so as to not screw up the [man]strtotime[/man] and [man]date[/man] functions.
Lastly, because this uses the strtotime function, you want to build in some error checking to make sure the date is between Jan 1, 1970 and Dec 31, 2037.