Download the PHP package parseword/sfsquery without Composer

On this page you can find all versions of the php package parseword/sfsquery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sfsquery

SFSQuery

A PHP class to query the StopForumSpam web API or DNSBL for information about an IP address. Help protect your comments, contact form, or other user-generated content from spammers by checking the StopForumSpam database in real time.

Usage

SFSQuery is platform-agnostic and can be used with any project. Simply require() the class file or place it where your autoloader can find it; Composer installation is supported.

The simplest implementation uses an anonymous object to check whether or not an IP meets one of several criteria. For example, you might want to reject an action if the user's IP has been reported to StopForumSpam in the past 7 days:

Because IP addresses frequently change hands, it's wise to use a more refined assessment based upon multiple factors. Just instantiate an SFSQuery object and call as many getter methods as you need. Let's check to see if an IP has been reported in the past 30 days, and has a spammer confidence level greater than 25%:

Perhaps you want to reject IPs from Russia which have been reported to StopForumSpam more than 10 times:

You should experiment to figure out what combination of factors is too "spammy" for your liking. You don't want to let a bunch of spammers through, but you don't want to cause a lot of false positives either. Consider a multi-tiered approach where high confidence spammers get rejected outright, lower scoring IPs have their comments flagged for moderator review, and totally clean IPs are free to submit content at will.

Method overview

StopForumSpam offers several data points about each IP in their database. SFSQuery exposes them all through getter methods.

There are several additional methods available:

To prevent unnecessary network traffic, the StopForumSpam API is queried only once during the lifetime of an SFSQuery object, with all of the data points being set during the initial query. If you use an object caching layer on top of PHP, consider forcing SFSQuery objects to be garbage collected at some regular interval so you aren't seeing stale results.

Querying the StopForumSpam DNSBL

SFSQuery version 1.1.0 introduces the ability to query StopForumSpam's DNSBL service instead of the web API. Using the DNSBL offers several advantages:

The trade-off is that StopForumSpam's DNSBL doesn't provide information about the target IP's ASN or country code. The getAsn() and getCountry() methods aren't compatible with DNSBL mode and will return 0 and null, respectively.

To make SFSQuery use the DNSBL instead of the web API, you must instantiate an SFSQuery object and call setQueryMethod(SFSQuery::QUERYMETHOD_DNS);

Remember that if you use the DNSBL service, you won't be able to test for the IP's ASN or country code.

Requirements

SFSQuery is written for PHP 7. To perform API connections, it requires one of the following to be available: fopen() URL wrappers, curl, or fsockopen(). To query the DNSBL, the gethostbyname() function must be available.

Limitations

At present, only queries for IP addresses are supported. Web API queries can be made for both IPv4 and IPv6 addresses. DNSBL queries are currently limited to IPv4 addresses only. The ability to query email addresses may come in a future release.

Disclaimer

The author is not affiliated with the StopForumSpam project. Any use of their service must comply with their Acceptable Use Policy.


All versions of sfsquery with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package parseword/sfsquery contains the following files

Loading the files please wait ....