PHP Tumblr
During the big storm tonight, I found myself checking out the Tumblr API while watching the news to make sure I didn’t need to hide in my bathroom.
I’ve been all about PHP wrappers for APIs lately. I whipped up a quick class that grabs a Tumblr account’s data and wrote some functions to do stuff with it.
Here’s what I’ve come up with so far.
It pretty much recreates a simple Tumblr theme. The beauty of this is that it only took four lines of PHP code and four CSS rules to create that output:
PHP:
$tumblr = new PhpTumblr("jaytee");
echo $tumblr->title;
echo $tumblr->description;
$tumblr->display();
CSS:
body {font-size: 10pt; font-family: arial, sans-serif;}
.details {font-size: 8pt;}
dt {font-weight: bold;}
.description {font-style: italic;}
There were h1 and h2’s around the title and description, but I can’t get the markup to show here.
12 Notes/ Hide
-
canada-news reblogged this from jaytee
-
insprd liked this
-
stabilefeasi liked this
-
kamikazecalu liked this
-
tongswhimsic liked this
-
elegancydiss liked this
-
veiledpredic liked this
-
a1027meadnews liked this
-
gaycutemilf liked this
-
ivebeatentetris liked this
-
jorgeledesma liked this
-
tumblklaat liked this
-
still-broken-hearts liked this
-
nb109 liked this
-
ssleep liked this
-
blupixl reblogged this from jaytee and added:
could get that class, or find one similar
-
jaytee posted this