sasezakiの日記

 | 

2007-08-29

<?php
$file = "test2.jpg";
$email = 'test@test.org';
$password = 'jkondolove';

/////////////////////
require_once 'Zend/Http/Client.php';
require_once 'Pel/PelJpeg.php';

$jpeg = new PelJpeg($file);

$posts['email'] = $email;   
$posts['password'] = $password;
    //$posts['type'] = 'regular';
    //$posts['title'] = 'title';
    //$posts['body']  = 'bodybody';
$posts['type'] = 'photo';
$posts['data'] = $jpeg->getBytes();

$client = new Zend_Http_Client();
$client->setUri('http://www.tumblr.com/api/write');
$client->setParameterPost($posts);
        
$request  = $client->request('POST');
$response = $request->getStatus();

if ($response == 201){echo "success!";};

JimmieJimmie 2012/07/27 16:08 That hits the target perfeclty. Thanks!

qpxnnkrjqpxnnkrj 2012/07/28 19:32 Af5Lam , [url=http://psslzkqeskon.com/]psslzkqeskon[/url], [link=http://whglqgusxfge.com/]whglqgusxfge[/link], http://hzzawjbxcvvi.com/

pkmwslypkmwsly 2012/07/29 07:38 6Gc6Y0 <a href="http://pjnnuxazcvdq.com/">pjnnuxazcvdq</a>

rznvvthdparznvvthdpa 2012/07/30 14:46 KEu414 , [url=http://ukhesypiajfg.com/]ukhesypiajfg[/url], [link=http://opkzimodszdf.com/]opkzimodszdf[/link], http://nvdsrmhqcoyu.com/

ゲスト



トラックバック - http://tumblr.g.hatena.ne.jp/sasezaki/20070829
 |