// find feedburner feed function (parses a users page for a feed link)
function findfeedburner($page_url){
// can’t open default wordpress feed, use curl to parse users page for a relative link feed
if(function_exists(curl_init)) {
$ch=curl_init();
$timeout = 10; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $page_url );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data=curl_exec($ch);
curl_close($ch);
$lines=explode(”n”,$data);
// look for feedburner url
foreach($lines as $line){
if(strstr($line,”alternate”)&& strstr($line,”rss”)){
$pos=strpos($line,”href”);
$cut=substr($line,$pos+5);
$feed_url=LL_TextBetween(”"”,”"”,$cut);
break;
}
}
}
return $feed_url;
}
function ajax_comment_luv($url,$type){
$debug=0; // for my own debugging, shows a breadcrumb of what is tried for parsing
$manual_feed=0;
$author_url=$url;
// if no author url given, return
if(!$author_url){
return “no author url”;
}
include_once(’rss_fetch.inc’);
error_reporting(E_ERROR);
define(’MAGPIE_FETCH_TIME_OUT’, 2);
define(’MAGPIE_CACHE_AGE’,1);
// **************************
// *** identify blog type ***
// **************************
// try and determine blog type and locate default location for feed.
if(strstr($author_url,”blogspot”)){ // blogspot blog
$feed_url=”$author_url/feeds/posts/default/”;
} elseif(strstr($author_url,”typepad”)){ // typepad blog
$feed_url=”$author_url/atom.xml”;
} else {
$feed_url=”$author_url/feed/”; // own domain or wordpress blog
}
// *******************************
// *** time to do the fetching ***
// *******************************
// fetch feed with WP function
$rss=fetch_rss(”$feed_url”);
// couldn’t find it there either! try to parse users page
if(!$rss && !$manual_feed){
// debug
if($debug) {
$comment_data['comment_content']=substr_replace($comment_data['comment_content'], ‘ (try parsing) ‘,strlen($comment_data['comment_content']),0);
}
$feed_url=findfeedburner($author_url);
$rss=fetch_rss(”$feed_url”);
}
// couldn’t find it at all, just return with a sad face
if(!$rss) {
// debug
if($debug) {
$comment_data['comment_content']=substr_replace($comment_data['comment_content'], ‘ (failed) ‘,strlen($comment_data['comment_content']),0);
}
return “couldn’t find a feed”;
}
// **************************
// *** do the parse dance ***
// **************************
// now we must have a feed to parse, get last post title and link
$items= array_slice($rss->items,0,5);
$arr = array();
$item = array();
$i=0;
foreach($items as $item){
$feed_title[$i]=$item['title'];
$feed_post[$i]=$item['link'];
//build array of html links
$links[$i]=”“.$feed_title[$i].”“;
//build json ouput
$arr['links'][$i] = array(’url’=>$feed_post[$i],’title’=>$feed_title[$i]);
$i++;
}
// thats it! pass back the new comment data to wordpress
//$link=”$feed_title“;
switch($type){
case “single”:
echo $links[0];
break;
case “list”:
foreach($links as $link){
echo “”.$link.”";
}
break;
case “xml”:
echo ” “;
foreach($items as $item){
echo “”.$item['title'].”".$item['link'].”";
}
echo “”;
break;
case “json”:
$i=0;
header(”Content-Type: application/x-javascript; charset=utf-8″);
$callback=$_GET['callback'];
if($callback){
echo $callback .”(”;
}
echo json_encode($arr);
if($callback){
echo “)”;
}
break;
default:
echo $links[0];
}
return;
Tigis says:
April 18th, 2008 at 1:54:13 pm
ini serius bro ?

Tigiss last blog post..Berita tentang Bambang Pamungkas
[Reply]
regsa says:
April 18th, 2008 at 9:17:34 pm
chafeek dech…
regsas last blog post..0){$pos1 = strpos($scheck,$s1);} else {$pos1=0;}
if($pos1 !== false){
if($s2 == ”) return substr($s,$pos1+$L1);
$pos2 = strpos(substr($scheck,$pos1+$L1),$s2);
if($pos2!==false) return substr($s,$pos1+$L1,$pos2);
}
return ”;
}
// find feedburner feed function (parses a users page for a feed link)
function findfeedburner($page_url){
// can’t open default wordpress feed, use curl to parse users page for a relative link feed
if(function_exists(curl_init)) {
$ch=curl_init();
$timeout = 10; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $page_url );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data=curl_exec($ch);
curl_close($ch);
$lines=explode(”n”,$data);
// look for feedburner url
foreach($lines as $line){
if(strstr($line,”alternate”)&& strstr($line,”rss”)){
$pos=strpos($line,”href”);
$cut=substr($line,$pos+5);
$feed_url=LL_TextBetween(”"”,”"”,$cut);
break;
}
}
}
return $feed_url;
}
function ajax_comment_luv($url,$type){
$debug=0; // for my own debugging, shows a breadcrumb of what is tried for parsing
$manual_feed=0;
$author_url=$url;
// if no author url given, return
if(!$author_url){
return “no author url”;
}
include_once(’rss_fetch.inc’);
error_reporting(E_ERROR);
define(’MAGPIE_FETCH_TIME_OUT’, 2);
define(’MAGPIE_CACHE_AGE’,1);
// **************************
// *** identify blog type ***
// **************************
// try and determine blog type and locate default location for feed.
if(strstr($author_url,”blogspot”)){ // blogspot blog
$feed_url=”$author_url/feeds/posts/default/”;
} elseif(strstr($author_url,”typepad”)){ // typepad blog
$feed_url=”$author_url/atom.xml”;
} else {
$feed_url=”$author_url/feed/”; // own domain or wordpress blog
}
// *******************************
// *** time to do the fetching ***
// *******************************
// fetch feed with WP function
$rss=fetch_rss(”$feed_url”);
// couldn’t find it! look in other places
if(!$rss && !$manual_feed){
// debug
if($debug) {
$comment_data['comment_content']=substr_replace($comment_data['comment_content'], ‘ (try alternate) ‘,strlen($comment_data['comment_content']),0);
}
$feed_url=”$author_url/?feed=rss”;
$rss=fetch_rss(”$feed_url”);
}
// couldn’t find it there either! try to parse users page
if(!$rss && !$manual_feed){
// debug
if($debug) {
$comment_data['comment_content']=substr_replace($comment_data['comment_content'], ‘ (try parsing) ‘,strlen($comment_data['comment_content']),0);
}
$feed_url=findfeedburner($author_url);
$rss=fetch_rss(”$feed_url”);
}
// couldn’t find it at all, just return with a sad face
if(!$rss) {
// debug
if($debug) {
$comment_data['comment_content']=substr_replace($comment_data['comment_content'], ‘ (failed) ‘,strlen($comment_data['comment_content']),0);
}
return “couldn’t find a feed”;
}
// **************************
// *** do the parse dance ***
// **************************
// now we must have a feed to parse, get last post title and link
$items= array_slice($rss->items,0,5);
$arr = array();
$item = array();
$i=0;
foreach($items as $item){
$feed_title[$i]=$item['title'];
$feed_post[$i]=$item['link'];
//build array of html links
$links[$i]=”“.$feed_title[$i].”“;
//build json ouput
$arr['links'][$i] = array(’url’=>$feed_post[$i],’title’=>$feed_title[$i]);
$i++;
}
// thats it! pass back the new comment data to wordpress
//$link=”$feed_title“;
switch($type){
case “single”:
echo $links[0];
break;
case “list”:
foreach($links as $link){
echo “”.$link.”";
}
break;
case “xml”:
echo ” “;
foreach($items as $item){
echo “”.$item['title'].”".$item['link'].”";
}
echo “”;
break;
case “json”:
$i=0;
header(”Content-Type: application/x-javascript; charset=utf-8″);
$callback=$_GET['callback'];
if($callback){
echo $callback .”(”;
}
echo json_encode($arr);
if($callback){
echo “)”;
}
break;
default:
echo $links[0];
}
return;
} // end function
$url=$_GET['url'];//”http://www.fiddyp.co.uk”; //
$type=$_GET['type'];//”json”;//
ajax_comment_luv($url,$type);
/*
({
“title”: “CommentLuv Output”,
“link”: “http://www.commentluv.com”,
“description”: “”,
“generator”: “http://www.CommentLuv.com/”,
“items”: [
"{ title":"'.$feed_title[$i].’”,”url”:”‘.$feed_post[$i].’”}”
“]})”
*/
?>
[Reply]
Jauhari says:
May 1st, 2008 at 7:53:09 am
Ke ke ke ke
[Reply]
desska says:
May 5th, 2008 at 2:19:09 pm
Halah. Begitu hebatnya virus cintha lawra sampe² Dinas PU ikut ketularan :p
[Reply]
Fachia says:
May 11th, 2008 at 9:23:43 pm
wakaka.. baru liat fotonya aja udah ngakak setengah gila.. dasar cinta laura tuh, coba baca artikel terkait di sini http://tolololpedia.wikia.com/wiki/Cinta_Laura
ngakak deh aseli
[Reply]