Bout of Context

Month

September 2010

8 posts

Sep 29, 20103 notes
#Russian Vodka Room #Midtown West #Hard Liquor Hold the Emotion
Sep 26, 20103 notes
#Leo's Bagels
Sep 23, 20101 note
Sep 22, 20101 note
Sep 16, 201010 notes
#Yo Vanilla #Flip it one time boyyyyyyyyy #business #real estate
hey there. i'm new to php and was just wondering if you could tell me how you did to parse the images on your tumblr backup tool thing. sorry to bother but I'm really interested in doing this stuff. not looking for a tutorial or anything, just somewhere and I'll really appreciate it. cheers.

I parsed a file_get_contents(api/read URL) return value directly, using domxml_open_mem(). The script walks the many-to-one photo-url children of each photo post. Each photo-url contains the URL for a copy of the original image sized up to, but not larger than, the attributed max-width. For high-resolution images, each URL will be distinct. For small original images, you will see the URL to its largest size repeated, for example: 

…
<photo-url max-width=”1280”>
http://25.media.tumblr.com/SJZFJaHDo5vco3muV3EgxVjo_250.jpg
</photo-url>
−
<photo-url max-width=”500”>
http://25.media.tumblr.com/SJZFJaHDo5vco3muV3EgxVjo_250.jpg
</photo-url>
−
<photo-url max-width=”400”>
http://25.media.tumblr.com/SJZFJaHDo5vco3muV3EgxVjo_250.jpg
</photo-url>
…

Knowing an element for each of the standard max-widths will be present even for smaller images allows you to simplify by checking directly for a given max-width. You can also iterate through doing a getimagesize() on each to find actual dimensions.

Sep 11, 20103 notes
“There is an increasing amount of evidence that the rich are a vicious tribe of people. ” —Matthew Lynn, Ultra-Rich in Finance Are Meaner Than Rest of Us [Bloomberg]
Sep 8, 20104 notes
#Studies show
Sep 2, 20102 notes
#books #sex #living vicariously #coming and crying
Next page →
2010 2011
  • January 4
  • February 5
  • March 4
  • April
  • May
  • June
  • July
  • August
  • September 1
  • October 6
  • November 1
  • December
2009 2010 2011
  • January 18
  • February 11
  • March 19
  • April 13
  • May 12
  • June 11
  • July 15
  • August 6
  • September 8
  • October 7
  • November 6
  • December 4
2008 2009 2010
  • January 34
  • February 39
  • March 32
  • April 13
  • May 17
  • June 9
  • July 8
  • August 24
  • September 22
  • October 24
  • November 43
  • December 37
2007 2008 2009
  • January 75
  • February 115
  • March 147
  • April 80
  • May 42
  • June 59
  • July 44
  • August 50
  • September 39
  • October 20
  • November 13
  • December 23
2007 2008
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December 6