--- nsdl/lonsql 2005/11/17 22:04:47 1.2 +++ nsdl/lonsql 2005/11/17 22:34:49 1.3 @@ -3,7 +3,7 @@ # The LearningOnline Network # lonsql - LON TCP-NSDL Query Handler. # -# $Id: lonsql,v 1.2 2005/11/17 22:04:47 www Exp $ +# $Id: lonsql,v 1.3 2005/11/17 22:34:49 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,7 +113,10 @@ use IO::File; use Socket; use Fcntl; use Tie::RefHash; - +use HTML::LCParser(); +use LWP::UserAgent(); +use HTTP::Headers; +use HTTP::Date; use File::Find; use localenroll; @@ -847,7 +850,15 @@ sub HUPSMAN { # sig sub nsdl_query { my $query=shift; -} + my ($keyword)=($query=~/\"\%([^\%]+)\%\"/); + $keyword=&escape($keyword); + &logthis('Doing '.$keyword); + my $url='http://search.nsdl.org?verb=Search&s=0&n=500&q='.$keyword; + my $ua=new LWP::UserAgent; + my $response=$ua->get($url); + + return []; +} =pod