[PHPwestoz] post early, post often

Leon Brooks leon at cyberknights.com.au
Fri Feb 11 13:16:02 UTC 2005


On Thursday 10 February 2005 23:32, Samuel Cochran wrote:
> Me four. Although I will try be more active.

Here's a simple technique to staying active: post a PHP snippet once a 
month to amaze or appal the other list denizens. I'll start.

I send the odd photo to http://www.burningwell.org/ so that it might 
have a more useful life. It's tedious selecting and uploading 
individual photos, the upload bogs my link down for a minute while a 
couple of megabytes escape down the wire, and the web interface breaks 
occasionally if I do 3 at once, reliably if I do 4. So...

I have a little script (attached as nugrab.sh with attendant PHP 
template) which sucks all of the photos out of my camera into 
$HOME/photos/YYYYMMDD/ and then indexes them, producing a web page with 
thumbnails, 800x600 "moderate" images and the originals.

I wrote a pair of web pages that run on the server on this machine 
(index.phtml, thumb.phtml, moderate.phtml, addpic.phtml and 
doadd.phtml). I can hit that local web interface instantly, find the 
photo(s) I'm interested in uploading, view the moderates to make sure 
they look OK, key in a description, and submit them to a local 
database. At my later convenience (typically when I walk away from the 
machine at night) I run another PHP script from the command line 
(send_selected.php) which scans the database and sends any unsent 
images.

In the scripts (and bw.sql), $$SYMBOL$$ needs to be hand-edited to 
reflect local conditions.

It's a bit messy and ad-hoc, but has saved me several hours so far.

Cheers; Leon

--
http://cyberknights.com.au/     Modern tools; traditional dedication
http://plug.linux.org.au/       Member, Perth Linux User Group
http://osia.net.au/             Member, Open Source Industry Australia
http://slpwa.asn.au/            Member, Linux Professionals WA
http://linux.org.au/            Member, Linux Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bw.sql
Type: text/x-sql
Size: 920 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moderate.phtml
Type: application/x-php
Size: 241 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thumb.phtml
Type: application/x-php
Size: 240 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0002.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0002.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: send_selected.php
Type: application/x-php
Size: 1493 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nugrab
Type: application/x-shellscript
Size: 1265 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: index.html.800x600.php-template
Type: application/x-php
Size: 2927 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/phpwestoz/attachments/20050211/5fdd4d0a/attachment-0005.bin 


More information about the PHPwestoz mailing list