I've always been a fan of
http://php.resourceindex.com/ , though it's not always the free solution. It's great because it also has databases of java, etc, making it a good onestop place for scripting.
It's got the largest database of scripts i've seen yet.
And to echo Juan, O'Reilly is the way to go in terms of books.