Skip to content

ZenProjects/php-spf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP bindings for libspf2 (http://www.libspf2.org)

Install

Make sure you install libspf2 development package first.

$ git clone http://github.com/clone_url/php-spf.git
$ cd php-spf
$ phpize
$ ./configure
$ make
$ sudo make install
$ echo "extension=spf.so" > /etc/php5/conf.d/spf.ini

API

Spf

void        Spf::__construct([int $type[, string $domain[, string $spf]]])
SpfResponse Spf::query(string $ip, string $helo, string $sender[, string $recipient])

SpfResponse

string  SpfResponse::getResult();
string  SpfResponse::getHeaderComment();
string  SpfResponse::getReceivedSpf();
string  SpfResponse::getReceivedSpfValue();
string  SpfResponse::getExplanation();
string  SpfResponse::getSmtpComment();
boolean SpfResponse::hasErrors();
boolean SpfResponse::hasWarnings();
array   SpfResponse::getErrors();
array   SpfResponse::getWarnings();

Example

<?php
$spf = new Spf();
$response = $spf->query("216.239.32.2", "gmail.com", "[email protected]");
var_dump($response->getResult());
?>

About

PHP bindings to libspf2 for PHP 5.4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 91.3%
  • M4 4.5%
  • PHP 4.2%