Scoble, in Strong bloggers dont link writes “but if I read a blog that doesn’t link it usually sucks.”
Hey now… I resemble that remark! or… resent… have not really made up my mind about that yet
The random things that spew forth from my brain…
Scoble, in Strong bloggers dont link writes “but if I read a blog that doesn’t link it usually sucks.”
Hey now… I resemble that remark! or… resent… have not really made up my mind about that yet
I completely relate to Joe Stagner, who just wrote Trying to grok Ruby on Rails and says “Rails is what I would describe as academically interesting. [...] But I kept asking myself “so what”?” Well, Joe, I would say that you grok it perfectly well. It’s definately an excersize in “old hat” as you say.
There is nothing truly new or unique about it. This is much like we’re seeing with all web development. Got a bunch of young fresh smart guys (and I’m serious, this is NOT a put down of anyones skills) who have a, genuinely, good Idea and say “Hey look what I just figured out I can do!” Unfortunately it’s like an uneducated person coming up with the theory of evolution: Yes its a good idea, yes you’re very smart and probably right… but… no… it’s not new…”
The monkeys may, eventually (and given enough time), pound out Shakespear but it was still good old William who really invented it.
Here’s a real world example of what I was talking about earlier (using all parts of an array as relevant data) This is a small piece of some blogging related code I wrote earlier this week for Ookles (this is a part of a code package that will be made generally available when it’s ready)
[coolcode]
function get_html_metadata($url) {
/*
Example usage/test code
$test_urls[]=”http://jwz.livejournal.com/”;
$test_urls[]=”http://fuzzyblog.wordpress.com/”;
foreach ( $test_urls as $url ) {
$meta_tags=o_get_meta_tags($url);
foreach ( $meta_tags as $tag_type => $val ) {
echo “Tag Type: {$tag_type}\r\n”;
foreach ( $val as $tag_type_number => $val ) {
echo “\t#{$tag_type_number}\r\n”;
foreach ( $val as $tag_meta_key => $val ) {
echo “\t\t{$tag_meta_key}:\t”;
foreach ( $val as $tag__meta_value ) {
echo “{$tag__meta_value} “;
}
echo “\r\n”;
}
}
}
}
*/
$data=trim(file_get_contents($url));
$data=str_replace(chr(10), ”, $data);
$data=str_replace(‘/>’, ‘>’, $data);
$data=str_replace(‘>’, ‘>’.chr(10), $data);
$data=explode(chr(10), $data);
$meta_array=array();
// Loop through the different tags matching only tags with an = sign in them
foreach ( $data as $line ) {
if (ereg(‘<([^ ]+)[ ]+(.*=.*)>‘, $line, $r) ) {
$meta_type=$r[1];
$meta_counter[$meta_type]++;
$current_meta_counter=$meta_counter[$meta_type];
$mini_data=str_replace(‘=”‘, ‘=’, $r[2]);
$mini_data=str_replace(“=’”, ‘=’,$mini_data);
$mini_data=str_replace(‘”‘, chr(10), $mini_data);
$mini_data=str_replace(“‘”, chr(10), $mini_data);
$mini_data=explode(chr(10), trim($mini_data));
// for debugging: $meta_array[$meta_type][$current_meta_counter]['original'][]=$r[0];
foreach ( $mini_data as $val ) {
$val=explode(‘=’, trim($val));
$meta_key=$val[0];
$meta_val=$val[1];
// build our array
$meta_array[$meta_type][$current_meta_counter][$meta_key][]=$meta_val;
}
}
}
if ( count($meta_array) > 0 ) {
return($meta_array);
} else {
return(FALSE);
}
}
[/coolcode]