!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/share/doc/perl-RDF-Query/examples/   drwxr-xr-x
Free 6181.77 GB of 6262.97 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     query.pl (1.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

use strict;
use warnings;
use lib qw(lib);

use File::Spec;
use URI::file;
use RDF::Query;

unless (@ARGV) {
    print STDERR <<"END";
USAGE: $0 query.rq data.rdf [ data2.rdf ... ]

Reads in a SPARQL query from query.rq, and RDF/XML data from the data.rdf files.
The SPARQL query is executed against a triplestore containing data from the
data files, and query results are printed to standard output.

END
    exit;
}

# get the query file from the arguments array
my $query_file    = shift(@ARGV);

#open the query file and read in the query
my $sparql    = do { local($/) = undef; open(my $fh, '<:utf8', $query_file); <$fh> };

# construct the query object
my $query    = RDF::Query->new( $sparql );

unless ($query) {
    # the query couldn't be constructed. print out the reason why.
    warn RDF::Query->error;
    exit;
}

# read in the list of files with RDF/XML content for querying
my @files    = map { File::Spec->rel2abs( $_ ) } @ARGV;

# create a temporary triplestore, and wrap it into a model
my $store    = RDF::Trine::Store::DBI->temporary_store();
my $model    = RDF::Trine::Model->new( $store );

# create a rdf/xml parser object that we'll use to read in the rdf data
my $parser    = RDF::Trine::Parser->new('rdfxml');

# loop over all the files
foreach my $i (0 .. $#files) {
    my $file    = $files[ $i ];
    # $uri is the URI object used as the base uri for parsing
    my $uri        = URI::file->new_abs( $file );
    my $content    = do { open( my $fh, '<', $file ); local($/) = undef; <$fh> };
    $parser->parse_into_model( $uri, $content, $model );
}

# execute the query against data contained in the model
my $iter    = $query->execute( $model );

# print the results as a string to standard output
print $iter->as_string;

### or, if you want to iterator over each result row:
# while (my $s = $iter->next) {
#     print $s . "\n";
# }

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0205 ]--