<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Webthumb API additions</title>
	<atom:link href="http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/</link>
	<description>The weblog of Joshua Eichorn, AJAX, PHP and Open Source</description>
	<pubDate>Fri, 05 Sep 2008 22:19:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1-alpha</generator>
		<item>
		<title>By: Joshua Eichorn</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-491089</link>
		<dc:creator>Joshua Eichorn</dc:creator>
		<pubDate>Wed, 11 Jun 2008 16:34:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-491089</guid>
		<description>epto: I am looking into adding json support in the future, but its not like the xml were working with is complex so i don't see a huge win for anyone by supporting it and there are more interesting features to work on.</description>
		<content:encoded><![CDATA[<p>epto: I am looking into adding json support in the future, but its not like the xml were working with is complex so i don&#8217;t see a huge win for anyone by supporting it and there are more interesting features to work on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: epto</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-491083</link>
		<dc:creator>epto</dc:creator>
		<pubDate>Wed, 11 Jun 2008 16:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-491083</guid>
		<description>I think: 
json or serialize are better than xml in this application!
This script is simple and it work.

sid: is sthe filename

&#60;?
$sid=@$_GET['sid'];
$id=@$_GET['id'];

$savepath="/mysavepath";
$path=substr($id,-2).'/'.substr($id,-4,-2).'/'.substr($id,-6,-4);
$url="http://webthumb.bluga.net/data/$path/$id.jpg";
$data=file_get_contents($url);
if ($data!==FALSE AND strpos($data,'OK

Get this script as example and test
Don't lost the money and time with other!</description>
		<content:encoded><![CDATA[<p>I think:<br />
json or serialize are better than xml in this application!<br />
This script is simple and it work.</p>
<p>sid: is sthe filename</p>
<p>&lt;?<br />
$sid=@$_GET['sid'];<br />
$id=@$_GET['id'];</p>
<p>$savepath=&#8221;/mysavepath&#8221;;<br />
$path=substr($id,-2).&#8217;/&#8217;.substr($id,-4,-2).&#8217;/&#8217;.substr($id,-6,-4);<br />
$url=&#8221;http://webthumb.bluga.net/data/$path/$id.jpg&#8221;;<br />
$data=file_get_contents($url);<br />
if ($data!==FALSE AND strpos($data,&#8217;OK</p>
<p>Get this script as example and test<br />
Don&#8217;t lost the money and time with other!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Eichorn</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-179949</link>
		<dc:creator>Joshua Eichorn</dc:creator>
		<pubDate>Mon, 09 Apr 2007 16:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-179949</guid>
		<description>John:
You can have multiple request blocks for multiple urls see http://bluga.net/webthumb/api.txt for an example.

Filename wise I don't have a way to do nicer ones until I do a new rev of the api since I need unique names on my end and the files are directly exposed with the current design.</description>
		<content:encoded><![CDATA[<p>John:<br />
You can have multiple request blocks for multiple urls see <a href="http://bluga.net/webthumb/api.txt" rel="nofollow">http://bluga.net/webthumb/api.txt</a> for an example.</p>
<p>Filename wise I don&#8217;t have a way to do nicer ones until I do a new rev of the api since I need unique names on my end and the files are directly exposed with the current design.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-179931</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 09 Apr 2007 15:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-179931</guid>
		<description>Great web service, thank you.

Is there a way to make this get multiple images (from multiple URLs at a time? Or feed it a list of URLs?
And also to save them with filename domain1.com.jpeg, domain2.com.jpeg etc?

Seems to me these changes would make it very useful for lots of people

Thanks
John</description>
		<content:encoded><![CDATA[<p>Great web service, thank you.</p>
<p>Is there a way to make this get multiple images (from multiple URLs at a time? Or feed it a list of URLs?<br />
And also to save them with filename domain1.com.jpeg, domain2.com.jpeg etc?</p>
<p>Seems to me these changes would make it very useful for lots of people</p>
<p>Thanks<br />
John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oscar Merida</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-153151</link>
		<dc:creator>Oscar Merida</dc:creator>
		<pubDate>Fri, 16 Feb 2007 06:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-153151</guid>
		<description>Great service - the jobDir has changed since this script was written, I had to change it to the following to get it to work:

$jobDir = substr($jobId,-2) . '/' . substr($jobId, -4, 2) . '/' . substr($jobId, -6, 2);</description>
		<content:encoded><![CDATA[<p>Great service - the jobDir has changed since this script was written, I had to change it to the following to get it to work:</p>
<p>$jobDir = substr($jobId,-2) . &#8216;/&#8217; . substr($jobId, -4, 2) . &#8216;/&#8217; . substr($jobId, -6, 2);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-60771</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 23 Nov 2006 14:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-60771</guid>
		<description>The notify seems to be working beautifully for me. Awesome feature!</description>
		<content:encoded><![CDATA[<p>The notify seems to be working beautifully for me. Awesome feature!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Eichorn</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-44300</link>
		<dc:creator>Joshua Eichorn</dc:creator>
		<pubDate>Fri, 06 Oct 2006 15:11:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-44300</guid>
		<description>Nima, it was in my testing, but I don't think many people have used it yet so there could be a bug.

I don't see a request in the logs that contains a notify URL, but things are working correctly in my testing.

Send me an email (josh@bluga.net) with the XML payload your sending and we will get it worked out.</description>
		<content:encoded><![CDATA[<p>Nima, it was in my testing, but I don&#8217;t think many people have used it yet so there could be a bug.</p>
<p>I don&#8217;t see a request in the logs that contains a notify URL, but things are working correctly in my testing.</p>
<p>Send me an email (josh@bluga.net) with the XML payload your sending and we will get it worked out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nima</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-44236</link>
		<dc:creator>Nima</dc:creator>
		<pubDate>Fri, 06 Oct 2006 07:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-44236</guid>
		<description>Hi,


I use your notify script on my own server, but it seems not getting any hit (request) from your server.
Is it working correctly?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I use your notify script on my own server, but it seems not getting any hit (request) from your server.<br />
Is it working correctly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Eichorn</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-43713</link>
		<dc:creator>Joshua Eichorn</dc:creator>
		<pubDate>Tue, 03 Oct 2006 17:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-43713</guid>
		<description>Mike: I'll looking into putting the data back, with a notify type approach.  I went with making a seperate request for the image because its something I could get up and running in an hour.  It also allows me to serve up the images with straight apache instead of through php.  Anyhow there are some other features i'd like to add to the API and i'll put your idea on that list.</description>
		<content:encoded><![CDATA[<p>Mike: I&#8217;ll looking into putting the data back, with a notify type approach.  I went with making a seperate request for the image because its something I could get up and running in an hour.  It also allows me to serve up the images with straight apache instead of through php.  Anyhow there are some other features i&#8217;d like to add to the API and i&#8217;ll put your idea on that list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Naberezny</title>
		<link>http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-43624</link>
		<dc:creator>Mike Naberezny</dc:creator>
		<pubDate>Tue, 03 Oct 2006 09:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/#comment-43624</guid>
		<description>Joshua,

Another approach is that you could extend the WebThumb API to allow the client to specify which image size(s) the server should return.  This would give the server enough information to then complete the next transaction in single asynchronous POST request back to the client with the image data instead of just notifying.

The client end would be simplified by not having to make another request and no longer needing the secret key.  Clients would also gain the familiarity and efficiency of having the images you POST back like handled any other file uploads.  

On the server, it saves a roundtrip.  Also, scripts like notify.php above can hold your notifier connection open until the download is complete on a separate connection, effectively doubling the number of connections your server has to handle.  POSTing the data back in a single request eliminates this possibility so it will allow you to scale better as the API usage grows.

If you implement this, consider PUTting the image data back instead of POSTing it.  RESTifarians will appreciate your good taste in verbs and PHP provides handling for PUT requests (http://www.php.net/manual/en/features.file-upload.put-method.php).  If you wanted to get fancy and add a little extra security, allow users to specify auth credentials to use in the return PUT and then they even have the option of configuring their HTTP server to collect the images you send automatically.

Regards,
Mike Naberezny</description>
		<content:encoded><![CDATA[<p>Joshua,</p>
<p>Another approach is that you could extend the WebThumb API to allow the client to specify which image size(s) the server should return.  This would give the server enough information to then complete the next transaction in single asynchronous POST request back to the client with the image data instead of just notifying.</p>
<p>The client end would be simplified by not having to make another request and no longer needing the secret key.  Clients would also gain the familiarity and efficiency of having the images you POST back like handled any other file uploads.  </p>
<p>On the server, it saves a roundtrip.  Also, scripts like notify.php above can hold your notifier connection open until the download is complete on a separate connection, effectively doubling the number of connections your server has to handle.  POSTing the data back in a single request eliminates this possibility so it will allow you to scale better as the API usage grows.</p>
<p>If you implement this, consider PUTting the image data back instead of POSTing it.  RESTifarians will appreciate your good taste in verbs and PHP provides handling for PUT requests (http://www.php.net/manual/en/features.file-upload.put-method.php).  If you wanted to get fancy and add a little extra security, allow users to specify auth credentials to use in the return PUT and then they even have the option of configuring their HTTP server to collect the images you send automatically.</p>
<p>Regards,<br />
Mike Naberezny</p>
]]></content:encoded>
	</item>
</channel>
</rss>
