| #!/usr/bin/perl -- |
| #!/usr/bin/perl -- |
| |
| |
| ############################################################################### |
| ############################################################################### |
| # SpellChecker.pl # |
| # SpellChecker.pl # |
| |
| # $Date: 01.05.16 $ # |
| ############################################################################### |
| ############################################################################### |
| # YaBB: Yet another Bulletin Board # |
| # YaBB: Yet another Bulletin Board # |
| # Open-Source Community Software for Webmasters # |
| # Open-Source Community Software for Webmasters # |
| # Version: YaBB 2.5.2 # |
| # Version: YaBB 2.6.12 # |
| # Packaged: October 21, 2012 # |
| # Packaged: January 5, 2016 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Software by: The YaBB Development Team # |
| # Software by: The YaBB Development Team # |
| # with assistance from the YaBB community. # |
| # with assistance from the YaBB community. # |
| ############################################################################### |
| ############################################################################### |
| |
| use CGI::Carp qw(fatalsToBrowser); |
| |
| our $VERSION = '2.6.12'; |
| |
| |
| $spellcheckerplver = 'YaBB 2.5.2 $Revision: 1.1 $'; |
| $spellcheckerplver = 'YaBB 2.6.12 $Revision: 1651 $'; |
| |
| if ( $action eq 'detailedversion' ) { return 1; } |
| if ($action eq 'detailedversion') { return 1; } |
| |
| |
| |
| # Take the following comment out to see the error message if you |
| |
| # call the script directly from a new window of your browser |
| |
| # use CGI::Carp qw(fatalsToBrowser); |
| |
| |
| |
| use LWP::UserAgent; |
| use LWP::UserAgent; |
| use HTTP::Request::Common; |
| use HTTP::Request::Common; |
| |
| |
| my $ua = LWP::UserAgent->new(agent => 'GoogieSpell Client'); |
| $ua = LWP::UserAgent->new( agent => 'GoogieSpell Client' ); |
| my $reqXML = ""; |
| $reqXML = q{}; |
| |
| |
| read (STDIN, $reqXML, $ENV{'CONTENT_LENGTH'}); |
| read STDIN, $reqXML, $ENV{'CONTENT_LENGTH'}; |
| |
| |
| $url = "http://orangoo.com/newnox?lang=?$ENV{QUERY_STRING}"; |
| $url = "http://orangoo.com/newnox?lang=$ENV{'QUERY_STRING'}"; |
| my $res = $ua->request(POST $url, Content_Type => 'text/xml', Content => $reqXML); |
| $res = |
| |
| $ua->request(POST $url, Content_Type => 'text/xml', Content => $reqXML); |
| |
| |
| die "$res->{_content}" if $res->{_content} =~ /LWP.+https.+Crypt::SSLeay/; |
| croak "$res->{_content}" if $res->{_content} =~ /LWP.+https.+Crypt::SSLeay/sm; |
| |
| |
| print "Content-Type: text/xml\n\n"; |
| print "Content-Type: text/xml\n\n" or croak "$croak{'print'} content-type"; |
| print $res->{_content}; |
| print $res->{_content} or croak "$croak{'print'} speller"; |
| |
| |
| 1; |
| 1; |
| |
| |