Mariusz, thank you so much for your helpful code. I finally was successful at verifying the signature by making one edit to your code, right at the top. It is shown below for the next person stuck at this point.
You are a great community, thanks for all your help!
function verify_requests_signature($secret) {
$url = (($_SERVER['HTTPS'] === 'on') ? 'https://':'http://') . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$url = rawurlencode(utf8_encode($url));
$data = $_POST;
$requested_signature = $data['oauth_signature'];
unset($data['oauth_signature']);
$data_encoded = array();
foreach ($data as $key => $val) {
$data_encoded[] = $key.'='.rawurlencode(utf8_encode(stripslashes($val)));
}
asort($data_encoded);
$data_encoded = implode('&', $data_encoded);
$data = rawurlencode($data_encoded);
$secret = $secret.'&';
$sig_base = 'POST&'.$url.'&'.$data;
$our_signature = base64_encode(hash_hmac('sha1', $sig_base, $secret, true));
return ($requested_signature === $our_signature);
}