This doesn't work and I'm at a total loss. I can not for the life of me understand why.
<?php
// Let's get the content
$ch = curl_init("http://www.streamingfaith.com/prayer/devotionals");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$source2 = curl_exec($ch);
$start_text2 = '<h1 class="dd-title">';
$end_text2 = 'Scripture Of The Day:';
$start_pos2 = strpos($source2, $start_text2) + strlen($start_text2);
$end_pos2 = strpos($source2, $end_text2) - $start_pos2;
$content = substr($source2, $start_pos2, $end_pos2);
// let's strip the content
$text = $content;
//echo strip_tags($text);
echo "\n";
// Let's define Allowed tags and show it all
echo strip_tags($text, '<p></p><br/><strong><em>');
?>
However... I can retrieve the the page's content but it refuses to strip it
<?php
// Let's get the content
$ch = curl_init("http://www.streamingfaith.com/prayer/devotionals");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$source2 = curl_exec($ch);
echo $source2; // debug out only
/*
$start_text2 = '<h1 class="dd-title">';
$end_text2 = 'Scripture Of The Day:';
$start_pos2 = strpos($source2, $start_text2) + strlen($start_text2);
$end_pos2 = strpos($source2, $end_text2) - $start_pos2;
$content = substr($source2, $start_pos2, $end_pos2);
// let's strip the content
$text = $content;
//echo strip_tags($text);
echo "\n";
// Let's define Allowed tags and show it all
echo strip_tags($text, '<p></p><br/><strong><em>');
*/
?>