<?php
function str_hex_dump ($str) {
for ($i = 0, $l = strlen($str); $i < $l; $i++) {
echo str_pad(dechex(ord($str[$i])), 2, '0', STR_PAD_LEFT).($i + 1 < $l ? ' ' : '');
}
}
$textFromHTML = '<b>Padding You were not able to complete this job. Please try again at a later date. Do not hit your back button. Padding</b>';
$textToFind = 'You were not able to complete this job. Please try again at a later date. Do not hit your back button.';
$shorterText = 'You were not able';
$pos = strpos($textFromHTML, $shorterText);
str_hex_dump(substr($textFromHTML, $pos, strlen($textToFind)));
echo "\n";
str_hex_dump($textToFind);