use URLencode; do not create temp file for query; remove hardcoded URLs