http class
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 4619
DB_cart Class 1.13
DB_cart Class is a MySQL shopping cart script that can be used with third party product catalogues and membership systems. more>>
DB_cart Class is a MySQL shopping cart script that can be used with third party product catalogues and membership systems. The MySQL database structure is neutral to existing systems.
DB_cart Class can handle the shopping cart (add, update, and empty) and checkout process (set the shipment address and email the order).
For existing cart users, the shopping cart is still available upon the users next visit and is visible by checkout. The last option is configurable togther with a time period.
Enhancements:
- There are modifications and improvements inside the main class file, several examples, and the table structure has been extended.
- There two additional fields for the shipment values (name2 and address2).
- All messages are available in German, English, and Dutch.
- The standard text inside the email messages is in external files now; this content is parsed inside the improved email method.
<<lessDB_cart Class can handle the shopping cart (add, update, and empty) and checkout process (set the shipment address and email the order).
For existing cart users, the shopping cart is still available upon the users next visit and is visible by checkout. The last option is configurable togther with a time period.
Enhancements:
- There are modifications and improvements inside the main class file, several examples, and the table structure has been extended.
- There two additional fields for the shipment values (name2 and address2).
- All messages are available in German, English, and Dutch.
- The standard text inside the email messages is in external files now; this content is parsed inside the improved email method.
Download (0.035MB)
Added: 2006-06-16 License: BSD License Price:
1227 downloads
HTTP Grabber 1.0
HTTP grabber can be used to see what other people on your LAN are downloading. more>>
HTTP grabber can be used to see what other people on your LAN are downloading as it saves information being sent via the HTTP protocol to disk.
Check the makefile:
if libngrep isnt in /usr/local/lib, change the LFLAGS
if you dont want httpgrabber to be installed in /usr/local/bin, change the directory in the "install" rule.
To install just run "make" and "make install"
<<lessCheck the makefile:
if libngrep isnt in /usr/local/lib, change the LFLAGS
if you dont want httpgrabber to be installed in /usr/local/bin, change the directory in the "install" rule.
To install just run "make" and "make install"
Download (0.007MB)
Added: 2006-06-28 License: BSD License Price:
1220 downloads
lns.http 0.1
lns.http is a simple framework for writing Common LISP Web applications. more>>
lns.http is a simple framework for writing Common Lisp web applications. The project handles the incoming connections, parses HTTP headers and queries, and finally hands control over to your URL handler.
lns.http is a HTTP/1.1 compatible web server but tries to achieve compatibility with lesser (down to the informal HTTP/0.9) clients.
The lns.http web server uses lisp-network-server to take care of network handling.
This software is licensed unter the LGPL.
<<lesslns.http is a HTTP/1.1 compatible web server but tries to achieve compatibility with lesser (down to the informal HTTP/0.9) clients.
The lns.http web server uses lisp-network-server to take care of network handling.
This software is licensed unter the LGPL.
Download (0.017MB)
Added: 2006-12-19 License: LGPL (GNU Lesser General Public License) Price:
1046 downloads
TagCloud Maker Class 1.0
TagCloud Maker Class is a class that takes a single dimensional array of terms and outputs a piece of HTML with each term. more>>
TagCloud Maker Class is a class that takes a single dimensional array of terms and outputs a piece of HTML with each term wrapped in a span tag with an ID that you can define in your CSS.
TagCloud Maker Class script can be called either as an object or as a static class.
Check out the example page. The keywords from the sample page come from the last 30 entries of my blog. Ill admit I cheated and just open the database and pull them from there instead of trying to call my blog w/curl or fopen and parse it. (Although that would have been cooler.) I then ran each blog entry against Yahoos Term Extraction API to get the terms. Then I pumped that array into my new TagCloud maker. The important code you cant see from the index.php is below.
require_once(TagCloud.php);
$x = TagCloud::fetch_cloud($thisArray,...,tagcloud_,http://www.technorati.com/tags/%s);
$o = new TagCloud($thisArray,...,tagcloud_,http://www.technorati.com/tags/%s,10,weight,2);
$o->get_cloud();
$y = $o->output_cloud;
As you can see, I used 2 different methods of creating the 2 lists. The first is just calling the object::method statically with all the necessary parameters. This is by far the easiest way to use this class and unless you need something special, its the way I recommend. The second way it to instantiate an object. I pass all the variables into the constructor but you could just as easily use the setters to set them all. (dont know why you would but hey, I spent an extra 15 minutes creating getters and setters so use them, by all means use them!)
<<lessTagCloud Maker Class script can be called either as an object or as a static class.
Check out the example page. The keywords from the sample page come from the last 30 entries of my blog. Ill admit I cheated and just open the database and pull them from there instead of trying to call my blog w/curl or fopen and parse it. (Although that would have been cooler.) I then ran each blog entry against Yahoos Term Extraction API to get the terms. Then I pumped that array into my new TagCloud maker. The important code you cant see from the index.php is below.
require_once(TagCloud.php);
$x = TagCloud::fetch_cloud($thisArray,...,tagcloud_,http://www.technorati.com/tags/%s);
$o = new TagCloud($thisArray,...,tagcloud_,http://www.technorati.com/tags/%s,10,weight,2);
$o->get_cloud();
$y = $o->output_cloud;
As you can see, I used 2 different methods of creating the 2 lists. The first is just calling the object::method statically with all the necessary parameters. This is by far the easiest way to use this class and unless you need something special, its the way I recommend. The second way it to instantiate an object. I pass all the variables into the constructor but you could just as easily use the setters to set them all. (dont know why you would but hey, I spent an extra 15 minutes creating getters and setters so use them, by all means use them!)
Download (0.012MB)
Added: 2006-01-25 License: GPL (GNU General Public License) Price:
1380 downloads
WebServerInfo PHP class 1.0.0
WebServerInfo PHP class is intended for developer who create software that will run on different web servers. more>>
WebServerInfo PHP class is intended for developer who create software that will run
on different web servers. The project gives a developer a consistent interface
for accessing web servers variables.
Usage:
You have following options:
Option #1
require_once("WebServerInfo.class.php");
$obj = new WebServerInfo();
print $_SERVER[DOCUMENT_ROOT];
Option #2
require_once("WebServerInfo.class.php");
$obj = new WebServerInfo();
print $obj->get(DOCUMENT_ROOT);
Option #3
uncomment the 3rd line from WebServerInfo.class.php
and all you have to do is require the WebServerInfo.class.php class.
Note:
The constructor of WebServerInfo class overrides $_SERVER variable and
variables can be accessed as usual way.
Following base variables are exported if they do not exist.
REQUEST_URI
REDIRECT_URL
DOCUMENT_ROOT
SERVER_SIGNATURE
SERVER_ADDR
SCRIPT_FILENAME
<<lesson different web servers. The project gives a developer a consistent interface
for accessing web servers variables.
Usage:
You have following options:
Option #1
require_once("WebServerInfo.class.php");
$obj = new WebServerInfo();
print $_SERVER[DOCUMENT_ROOT];
Option #2
require_once("WebServerInfo.class.php");
$obj = new WebServerInfo();
print $obj->get(DOCUMENT_ROOT);
Option #3
uncomment the 3rd line from WebServerInfo.class.php
and all you have to do is require the WebServerInfo.class.php class.
Note:
The constructor of WebServerInfo class overrides $_SERVER variable and
variables can be accessed as usual way.
Following base variables are exported if they do not exist.
REQUEST_URI
REDIRECT_URL
DOCUMENT_ROOT
SERVER_SIGNATURE
SERVER_ADDR
SCRIPT_FILENAME
Download (0.013MB)
Added: 2006-11-22 License: LGPL (GNU Lesser General Public License) Price:
1067 downloads
Calendario Class 1.0
Calendario Class provides a PHP class that is useful for creating calendars and organizers. more>>
Calendario Class provides a PHP class that is useful for creating calendars and organizers.
Calendario Class is a PHP class that helps you to create calendar and organizers.
Its highly configurable, letting you choose how many days are in a week, when a week starts, the details of the HTML output, and so on.
It also knows about holidays.
Enhancements:
- Added holidays functionality
<<lessCalendario Class is a PHP class that helps you to create calendar and organizers.
Its highly configurable, letting you choose how many days are in a week, when a week starts, the details of the HTML output, and so on.
It also knows about holidays.
Enhancements:
- Added holidays functionality
Download (0.096MB)
Added: 2007-03-16 License: LGPL (GNU Lesser General Public License) Price:
956 downloads
Class::CGI 0.20
Class::CGI is a Perl module to fetch objects from your CGI object. more>>
Class::CGI is a Perl module to fetch objects from your CGI object.
SYNOPSIS
use Class::CGI
handlers => {
customer_id => My::Customer::Handler
};
my $cgi = Class::CGI->new;
my $customer = $cgi->param(customer_id);
my $name = $customer->name;
my $email = $cgi->param(email); # behaves like normal
if ( my %errors = $cgi->errors ) {
# do error handling
}
For small CGI scripts, its common to get a parameter, untaint it, pass it to an object constructor and get the object back. This module would allow one to to build Class::CGI handler classes which take the parameter value, automatically perform those steps and just return the object. Much grunt work goes away and you can get back to merely pretending to work.
<<lessSYNOPSIS
use Class::CGI
handlers => {
customer_id => My::Customer::Handler
};
my $cgi = Class::CGI->new;
my $customer = $cgi->param(customer_id);
my $name = $customer->name;
my $email = $cgi->param(email); # behaves like normal
if ( my %errors = $cgi->errors ) {
# do error handling
}
For small CGI scripts, its common to get a parameter, untaint it, pass it to an object constructor and get the object back. This module would allow one to to build Class::CGI handler classes which take the parameter value, automatically perform those steps and just return the object. Much grunt work goes away and you can get back to merely pretending to work.
Download (0.017MB)
Added: 2006-10-20 License: Perl Artistic License Price:
1099 downloads
PHP ImageMagick Class 1.0
PHP ImageMagick Class is a class for processing images with ImageMagick. more>>
PHP ImageMagick Class is a class for processing images with ImageMagick. This PHP Class makes it possible to process images in a very easy way.
To scale an image to 640x480 when its bigger youy can do this:
include(imagemagick.class.php);
$im = new Imagemagick($targetdir);
$im->Resize(640, 480, keep_aspect);
$im->Save();
$im->CleanUp();
?>
Enhancements:
- retrieve image data
- flip
- dither
- monochrome
- negate
- rotate
- blur
- draw frame
- resize
- square
- crop
- convert
- save
<<lessTo scale an image to 640x480 when its bigger youy can do this:
include(imagemagick.class.php);
$im = new Imagemagick($targetdir);
$im->Resize(640, 480, keep_aspect);
$im->Save();
$im->CleanUp();
?>
Enhancements:
- retrieve image data
- flip
- dither
- monochrome
- negate
- rotate
- blur
- draw frame
- resize
- square
- crop
- convert
- save
Download (0.005MB)
Added: 2006-07-14 License: GPL (GNU General Public License) Price:
712 downloads
IAM OPML Parser Class 1.0
IAM OPML Parser Class parses an OPML file (provided its URL) and returns an array. more>>
IAM OPML Parser Class parses an OPML file (provided its URL) and returns an array.
OPML (Outline Processor Markup Language) is an XML format for outlines. Originally developed by Radio UserLand as a native file format for an outliner application, it has since been adopted for other uses, the most common being to exchange lists of web feeds (RSS) between web feed aggregators. The OPML specification defines an outline as a hierarchical, ordered list of arbitrary elements. The specification is fairly open which makes it suitable for many types of list data.
The XML elements in an OPML document are:
< opml version=”1.0″ > This is the root element. It must contain the version attribute and one head and one body element. Currently, there’s active work in OML 2.0, which is mainly aimed at solving some of v1.o’s shortcomings.
< head > Contains metadata. May include any of these optional elements: title, dateCreated, dateModified, ownerName, ownerEmail, expansionState, vertScrollState, windowTop, windowLeft, windowBottom, windowRight. Each element is a simple text element. dateCreated and dateModified contents conform to the date-time format specified in RFC 822. expansionState contains a comma-separated list of line numbers that should be expanded o and size of the display window. An OPML processor may ignore all the head sub-elements. If the outline is opened inside another outline then the processor must ignore the window elements.
< body > Contains the content of the outline. Must have one or more outline elements.
< outline > Represents a line in the outline. May contain any number of arbitrary attributes. Common attributes include text and type. The outline element may contain any number of outline sub-elements. While there are many tools to create and/or read OPML files, there are few PHP libraries/functions to work with these files.
This PHP class parses an OPML file (provided its URL) and returns an array with all the parsed data. This array contains, for each of the OPML file’s elements the following attributes: link_url, link_name, link_target, link_description, link_rss, created (date of creation), type (link type: RSS, HTML, etc.). The class uses file_get_contents() to retrieve the contents of the OPML file and then the XML extension is used to parse and store the file’s data in an associative array, where each outline element is stored using a different array index. The array has the following structure:
0 : Array:
{
names => Preface
urls => http://www.php.net/manual/en/preface.php
targets =>
feeds =>
descriptions =>
created => Nov 28 2005 21:05:49 GMT
type => link
}
1 : Array:
{
names => I. Getting started
urls =>
targets =>
feeds =>
descriptions =>
created =>
type =>
}
<<lessOPML (Outline Processor Markup Language) is an XML format for outlines. Originally developed by Radio UserLand as a native file format for an outliner application, it has since been adopted for other uses, the most common being to exchange lists of web feeds (RSS) between web feed aggregators. The OPML specification defines an outline as a hierarchical, ordered list of arbitrary elements. The specification is fairly open which makes it suitable for many types of list data.
The XML elements in an OPML document are:
< opml version=”1.0″ > This is the root element. It must contain the version attribute and one head and one body element. Currently, there’s active work in OML 2.0, which is mainly aimed at solving some of v1.o’s shortcomings.
< head > Contains metadata. May include any of these optional elements: title, dateCreated, dateModified, ownerName, ownerEmail, expansionState, vertScrollState, windowTop, windowLeft, windowBottom, windowRight. Each element is a simple text element. dateCreated and dateModified contents conform to the date-time format specified in RFC 822. expansionState contains a comma-separated list of line numbers that should be expanded o and size of the display window. An OPML processor may ignore all the head sub-elements. If the outline is opened inside another outline then the processor must ignore the window elements.
< body > Contains the content of the outline. Must have one or more outline elements.
< outline > Represents a line in the outline. May contain any number of arbitrary attributes. Common attributes include text and type. The outline element may contain any number of outline sub-elements. While there are many tools to create and/or read OPML files, there are few PHP libraries/functions to work with these files.
This PHP class parses an OPML file (provided its URL) and returns an array with all the parsed data. This array contains, for each of the OPML file’s elements the following attributes: link_url, link_name, link_target, link_description, link_rss, created (date of creation), type (link type: RSS, HTML, etc.). The class uses file_get_contents() to retrieve the contents of the OPML file and then the XML extension is used to parse and store the file’s data in an associative array, where each outline element is stored using a different array index. The array has the following structure:
0 : Array:
{
names => Preface
urls => http://www.php.net/manual/en/preface.php
targets =>
feeds =>
descriptions =>
created => Nov 28 2005 21:05:49 GMT
type => link
}
1 : Array:
{
names => I. Getting started
urls =>
targets =>
feeds =>
descriptions =>
created =>
type =>
}
Download (0.002MB)
Added: 2007-07-23 License: Freeware Price:
823 downloads
HTTP::Handle 0.2
HTTP::Handle is a HTTP Class designed for streaming. more>>
HTTP::Handle is a HTTP Class designed for streaming.
SYNOPSIS
use HTTP::Handle;
my $http = HTTP::Handle->new( uri => "http://www.google.com/" );
$http->connect();
my $fd = $http->fd();
while () {
print "--> $_";
}
The HTTP::Handle module allows you to make HTTP requests and handle the data yourself. The general ideas is that you use this module to make a HTTP request and handle non-header data yourself. I needed such a feature for my mp3 player to listen to icecast streams.
HTTP::Handle->new()
Create a new HTTP::Handle object thingy.
Arguments possible:
url => "http://www.google.com/"
Sets the initial URL to connect to.
follow_redirects => [ 0 | 1 ]
Automatically follow HTTP redirects. This defaults to true (1). Set to 0 to disable this.
http_request => HASHREF
Any thing put in here will be sent as "key: value" in the http request string.
$http->connect()
Connect, send the http request, and process the response headers.
This function returns -1 on failure, undef otherwise. The reason for failure will be printed to STDERR.
$http->fd()
Get the file descriptor (socket) were using to connect.
$http->url( [ url_string ])
Get or set the URL. If a url string is passed, you will change the url that is requested. If no parameter is passed, a URI object will be returned containing the
$http->follow_redirects( [ 0 | 1 ] )
If a value is passed then you will set whether or not we will automatically follow HTTP 302 Redirects. If no value is passed, then we will return whatever the current option is.
Defaults to 1 (will follow redirects).
$http->http_request_string()
Returns a string containing the HTTP request and headers, this is used when
$http->connect() is called.
<<lessSYNOPSIS
use HTTP::Handle;
my $http = HTTP::Handle->new( uri => "http://www.google.com/" );
$http->connect();
my $fd = $http->fd();
while () {
print "--> $_";
}
The HTTP::Handle module allows you to make HTTP requests and handle the data yourself. The general ideas is that you use this module to make a HTTP request and handle non-header data yourself. I needed such a feature for my mp3 player to listen to icecast streams.
HTTP::Handle->new()
Create a new HTTP::Handle object thingy.
Arguments possible:
url => "http://www.google.com/"
Sets the initial URL to connect to.
follow_redirects => [ 0 | 1 ]
Automatically follow HTTP redirects. This defaults to true (1). Set to 0 to disable this.
http_request => HASHREF
Any thing put in here will be sent as "key: value" in the http request string.
$http->connect()
Connect, send the http request, and process the response headers.
This function returns -1 on failure, undef otherwise. The reason for failure will be printed to STDERR.
$http->fd()
Get the file descriptor (socket) were using to connect.
$http->url( [ url_string ])
Get or set the URL. If a url string is passed, you will change the url that is requested. If no parameter is passed, a URI object will be returned containing the
$http->follow_redirects( [ 0 | 1 ] )
If a value is passed then you will set whether or not we will automatically follow HTTP 302 Redirects. If no value is passed, then we will return whatever the current option is.
Defaults to 1 (will follow redirects).
$http->http_request_string()
Returns a string containing the HTTP request and headers, this is used when
$http->connect() is called.
Download (0.005MB)
Added: 2006-11-16 License: Perl Artistic License Price:
1072 downloads
HTTP::GetImages 0.343
HTTP::GetImages is a spider to recover and store images from web pages. more>>
HTTP::GetImages is a spider to recover and store images from web pages.
SYNOPSIS
use HTTP::GetImages;
$_ = new HTTP::GetImages (
dir => .,
todo => [http://www.google.com/,],
dont => [http://www.somewhere/ignorethis.html,http://and.this.html],
chat => 1,
);
$_->print_imgs;
$_->print_done;
$_->print_failed;
$_->print_ignored;
my $hash = $_->imgs_as_hash;
foreach (keys %{$hash}){
warn "$_ = ",$hash->{$_},"n";
}
exit;
This module allow syou to automate the searching, recovery and local storage of images from the web, including those linked by anchor (A), mage (IMG) and image map (AREA) elements.
Supply a URI or list of URIs to process, and HTTP::GetImages will recurse over every link it finds, searching for images.
By supplying a list of URIs, you can restrict the search to certain webservers and directories, or exclude it from certain webservers and directories.
You can also decide to reject images that are too small or too large.
<<lessSYNOPSIS
use HTTP::GetImages;
$_ = new HTTP::GetImages (
dir => .,
todo => [http://www.google.com/,],
dont => [http://www.somewhere/ignorethis.html,http://and.this.html],
chat => 1,
);
$_->print_imgs;
$_->print_done;
$_->print_failed;
$_->print_ignored;
my $hash = $_->imgs_as_hash;
foreach (keys %{$hash}){
warn "$_ = ",$hash->{$_},"n";
}
exit;
This module allow syou to automate the searching, recovery and local storage of images from the web, including those linked by anchor (A), mage (IMG) and image map (AREA) elements.
Supply a URI or list of URIs to process, and HTTP::GetImages will recurse over every link it finds, searching for images.
By supplying a list of URIs, you can restrict the search to certain webservers and directories, or exclude it from certain webservers and directories.
You can also decide to reject images that are too small or too large.
Download (0.007MB)
Added: 2006-11-15 License: GPL (GNU General Public License) Price:
1073 downloads
Exception::Class 1.23
Exception::Class is a Perl module that allows you to declare real exception classes in Perl. more>>
Exception::Class is a Perl module that allows you to declare real exception classes in Perl.
SYNOPSIS
use Exception::Class
( MyException,
AnotherException =>
{ isa => MyException },
YetAnotherException =>
{ isa => AnotherException,
description => These exceptions are related to IPC },
ExceptionWithFields =>
{ isa => YetAnotherException,
fields => [ grandiosity, quixotic ],
alias => throw_fields,
},
);
# try
eval { MyException->throw( error => I feel funny. ) };
my $e;
# catch
if ( $e = Exception::Class->caught(MyException) )
{
warn $e->error, "n", $e->trace->as_string, "n";
warn join , $e->euid, $e->egid, $e->uid, $e->gid, $e->pid, $e->time;
exit;
}
elsif ( $e = Exception::Class->caught(ExceptionWithFields) )
{
$e->quixotic ? do_something_wacky() : do_something_sane();
}
else
{
$e = Exception::Class->caught();
ref $e ? $e->rethrow : die $e;
}
# use an alias - without parens subroutine name is checked at
# compile time
throw_fields error => "No strawberry", grandiosity => "quite a bit";
Exception::Class allows you to declare exception hierarchies in your modules in a "Java-esque" manner.
It features a simple interface allowing programmers to declare exception classes at compile time. It also has a base exception class, Exception::Class::Base, that can be easily extended.
It is designed to make structured exception handling simpler and better by encouraging people to use hierarchies of exceptions in their applications, as opposed to a single catch-all exception class.
This module does not implement any try/catch syntax. Please see the "OTHER EXCEPTION MODULES (try/catch syntax)" section for more information on how to get this syntax.
<<lessSYNOPSIS
use Exception::Class
( MyException,
AnotherException =>
{ isa => MyException },
YetAnotherException =>
{ isa => AnotherException,
description => These exceptions are related to IPC },
ExceptionWithFields =>
{ isa => YetAnotherException,
fields => [ grandiosity, quixotic ],
alias => throw_fields,
},
);
# try
eval { MyException->throw( error => I feel funny. ) };
my $e;
# catch
if ( $e = Exception::Class->caught(MyException) )
{
warn $e->error, "n", $e->trace->as_string, "n";
warn join , $e->euid, $e->egid, $e->uid, $e->gid, $e->pid, $e->time;
exit;
}
elsif ( $e = Exception::Class->caught(ExceptionWithFields) )
{
$e->quixotic ? do_something_wacky() : do_something_sane();
}
else
{
$e = Exception::Class->caught();
ref $e ? $e->rethrow : die $e;
}
# use an alias - without parens subroutine name is checked at
# compile time
throw_fields error => "No strawberry", grandiosity => "quite a bit";
Exception::Class allows you to declare exception hierarchies in your modules in a "Java-esque" manner.
It features a simple interface allowing programmers to declare exception classes at compile time. It also has a base exception class, Exception::Class::Base, that can be easily extended.
It is designed to make structured exception handling simpler and better by encouraging people to use hierarchies of exceptions in their applications, as opposed to a single catch-all exception class.
This module does not implement any try/catch syntax. Please see the "OTHER EXCEPTION MODULES (try/catch syntax)" section for more information on how to get this syntax.
Download (0.016MB)
Added: 2007-05-23 License: Perl Artistic License Price:
884 downloads
EasyHTTPD 1.1.0b
EasyHTTPD is a drop in C++ class to implement an HTTP 1.0 Server - Now with OpenSSL Support! more>>
EasyHTTPD is a drop in C++ class to implement an HTTP 1.0 Server - Now with OpenSSL Support! The class can be used to allow an application to be controlled by a browser, hence Embedded.
To this functionality to an app, add the C++ class to the application, write and register request callback handlers with the class, and call the parser with a connected socket.
The parser will extract any options passed in the URL, extract POST values, and call the desired handler.
The handler get a pointer to the application via void ptr, has haccess to the extracted options and POST values, and then write the desired output back to the socket.
For easy dynamic page generate, an HTML template file can be used, and the handler simply specifies token tags in the template to be replace with the dynamic values (aka search and replace )
HOW TO USE IN YOUR APPLICATION:
These classes use the STL (Standard Template Library), so your enviroment must have the STL available.
Add the embedhttp.cpp file to your project, and the embedhttp.h file to the file(s) in your project that handles incomming socket connections.
See the sample1.cpp and helloworld.cpp files to get an idea of how to use these classes.
Enhancements:
- Removed regex as a dependency. Regex library is no longer needed.
- Added member functions to do the following:
o Get the client headers
o Send headers back to the client
o Specify alternate socket send/recv functions to support use with OpenSSL
o Specify a pre-request handler, a handler that can be called for all requests before the specifc request handler get called
- Fixed bug in helloworld_template.html.
- Fixed bug in parse which occured when the client did not send any headers.
- Added hello world sample using OpenSSL.
- Added the wiki: http://www.littletux.com/wiki
<<lessTo this functionality to an app, add the C++ class to the application, write and register request callback handlers with the class, and call the parser with a connected socket.
The parser will extract any options passed in the URL, extract POST values, and call the desired handler.
The handler get a pointer to the application via void ptr, has haccess to the extracted options and POST values, and then write the desired output back to the socket.
For easy dynamic page generate, an HTML template file can be used, and the handler simply specifies token tags in the template to be replace with the dynamic values (aka search and replace )
HOW TO USE IN YOUR APPLICATION:
These classes use the STL (Standard Template Library), so your enviroment must have the STL available.
Add the embedhttp.cpp file to your project, and the embedhttp.h file to the file(s) in your project that handles incomming socket connections.
See the sample1.cpp and helloworld.cpp files to get an idea of how to use these classes.
Enhancements:
- Removed regex as a dependency. Regex library is no longer needed.
- Added member functions to do the following:
o Get the client headers
o Send headers back to the client
o Specify alternate socket send/recv functions to support use with OpenSSL
o Specify a pre-request handler, a handler that can be called for all requests before the specifc request handler get called
- Fixed bug in helloworld_template.html.
- Fixed bug in parse which occured when the client did not send any headers.
- Added hello world sample using OpenSSL.
- Added the wiki: http://www.littletux.com/wiki
Download (0.016MB)
Added: 2007-07-19 License: BSD License Price:
828 downloads
Class::Meta 0.53
Class::Meta is a Perl class automation, introspection, and data validation. more>>
Class::Meta is a Perl class automation, introspection, and data validation.
SYNOPSIS
Generate a class:
package MyApp::Thingy;
use strict;
use Class::Meta;
use Class::Meta::Types::String;
use Class::Meta::Types::Numeric;
BEGIN {
# Create a Class::Meta object for this class.
my $cm = Class::Meta->new( key => thingy );
# Add a constructor.
$cm->add_constructor(
name => new,
create => 1,
);
# Add a couple of attributes with generated methods.
$cm->add_attribute(
name => uuid,
authz => Class::Meta::READ,
type => string,
required => 1,
default => sub { Data::UUID->new->create_str },
);
$cm->add_attribute(
name => name,
is => string,
required => 1,
default => undef,
);
$cm->add_attribute(
name => age,
is => integer,
default => undef,
);
# Add a custom method.
$cm->add_method(
name => chk_pass,
view => Class::Meta::PUBLIC,
);
$cm->build;
}
Then use the class:
use MyApp::Thingy;
my $thingy = MyApp::Thingy->new;
print "ID: ", $thingy->id, $/;
$thingy->name(Larry);
print "Name: ", $thingy->name, $/;
$thingy->age(42);
print "Age: ", $thingy->age, $/;
Or make use of the introspection API:
use MyApp::Thingy;
my $class = MyApp::Thingy->my_class;
my $thingy;
print "Examining object of class ", $class->package, $/;
print "nConstructors:n";
for my $ctor ($class->constructors) {
print " o ", $ctor->name, $/;
$thingy = $ctor->call($class->package);
}
print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, " => ", $attr->get($thingy), $/;
if ($attr->authz >= Class::Meta::SET && $attr->type eq string) {
$attr->get($thingy, hey there!);
print " Changed to: ", $attr->get($thingy), $/;
}
}
print "nMethods:n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}
Class::Meta provides an interface for automating the creation of Perl classes with attribute data type validation. It differs from other such modules in that it includes an introspection API that can be used as a unified interface for all Class::Meta-generated classes. In this sense, it is an implementation of the "Facade" design pattern.
<<lessSYNOPSIS
Generate a class:
package MyApp::Thingy;
use strict;
use Class::Meta;
use Class::Meta::Types::String;
use Class::Meta::Types::Numeric;
BEGIN {
# Create a Class::Meta object for this class.
my $cm = Class::Meta->new( key => thingy );
# Add a constructor.
$cm->add_constructor(
name => new,
create => 1,
);
# Add a couple of attributes with generated methods.
$cm->add_attribute(
name => uuid,
authz => Class::Meta::READ,
type => string,
required => 1,
default => sub { Data::UUID->new->create_str },
);
$cm->add_attribute(
name => name,
is => string,
required => 1,
default => undef,
);
$cm->add_attribute(
name => age,
is => integer,
default => undef,
);
# Add a custom method.
$cm->add_method(
name => chk_pass,
view => Class::Meta::PUBLIC,
);
$cm->build;
}
Then use the class:
use MyApp::Thingy;
my $thingy = MyApp::Thingy->new;
print "ID: ", $thingy->id, $/;
$thingy->name(Larry);
print "Name: ", $thingy->name, $/;
$thingy->age(42);
print "Age: ", $thingy->age, $/;
Or make use of the introspection API:
use MyApp::Thingy;
my $class = MyApp::Thingy->my_class;
my $thingy;
print "Examining object of class ", $class->package, $/;
print "nConstructors:n";
for my $ctor ($class->constructors) {
print " o ", $ctor->name, $/;
$thingy = $ctor->call($class->package);
}
print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, " => ", $attr->get($thingy), $/;
if ($attr->authz >= Class::Meta::SET && $attr->type eq string) {
$attr->get($thingy, hey there!);
print " Changed to: ", $attr->get($thingy), $/;
}
}
print "nMethods:n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}
Class::Meta provides an interface for automating the creation of Perl classes with attribute data type validation. It differs from other such modules in that it includes an introspection API that can be used as a unified interface for all Class::Meta-generated classes. In this sense, it is an implementation of the "Facade" design pattern.
Download (0.060MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1114 downloads
Class::Std 0.0.8
Class::Std is a Perl module to support for creating standard inside-out classes. more>>
Class::Std is a Perl module to support for creating standard "inside-out" classes.
SYNOPSIS
package MyClass;
use Class::Std;
# Create storage for object attributes...
my %name : ATTR;
my %rank : ATTR;
my %snum : ATTR;
my %public_data : ATTR;
# Handle initialization of objects of this class...
sub BUILD {
my ($self, $obj_ID, $arg_ref) = @_;
$name{$obj_ID} = check_name( $arg_ref->{name} );
$rank{$obj_ID} = check_rank( $arg_ref->{rank} );
$snum{$obj_ID} = _gen_uniq_serial_num();
}
# Handle cleanup of objects of this class...
sub DEMOLISH {
my ($self, $obj_ID) = @_;
_recycle_serial_num( $snum{$obj_ID} );
}
# Handle unknown method calls...
sub AUTOMETHOD {
my ($self, $obj_ID, @other_args) = @_;
# Return any public data...
if ( m/A get_(.*)/ ) { # Method name passed in $_
my $get_what = $1;
return sub {
return $public_data{$obj_ID}{$get_what};
}
}
warn "Cant call $method_name on ", ref $self, " object";
return; # The call is declined by not returning a sub ref
}
This module provides tools that help to implement the "inside out object" class structure in a convenient and standard way.
<<lessSYNOPSIS
package MyClass;
use Class::Std;
# Create storage for object attributes...
my %name : ATTR;
my %rank : ATTR;
my %snum : ATTR;
my %public_data : ATTR;
# Handle initialization of objects of this class...
sub BUILD {
my ($self, $obj_ID, $arg_ref) = @_;
$name{$obj_ID} = check_name( $arg_ref->{name} );
$rank{$obj_ID} = check_rank( $arg_ref->{rank} );
$snum{$obj_ID} = _gen_uniq_serial_num();
}
# Handle cleanup of objects of this class...
sub DEMOLISH {
my ($self, $obj_ID) = @_;
_recycle_serial_num( $snum{$obj_ID} );
}
# Handle unknown method calls...
sub AUTOMETHOD {
my ($self, $obj_ID, @other_args) = @_;
# Return any public data...
if ( m/A get_(.*)/ ) { # Method name passed in $_
my $get_what = $1;
return sub {
return $public_data{$obj_ID}{$get_what};
}
}
warn "Cant call $method_name on ", ref $self, " object";
return; # The call is declined by not returning a sub ref
}
This module provides tools that help to implement the "inside out object" class structure in a convenient and standard way.
Download (0.030MB)
Added: 2006-09-26 License: Perl Artistic License Price:
1124 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above http class search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed