PHP socket SMTP邮件类
Posted in PHP技术 on 2006/07/05 / 评论(0) »
[code]<?
class smtp
{
/* Public Variables */
var $smtp_port;
var $time_out;
var $host_name;
var $log_file;
var $relay_host;
var $debug;
var $auth;
var $user;
var $pass;

/* Private Variables */
var $sock;

/* Constractor */
function smtp($relay_host = "", $smtp_port = 25,$auth = false,$user,$pass)
{
$this->debug = FALSE;
一只蜘蛛
Posted in PHP技术 on 2006/06/22 / 评论(0) »
[code]<?php
error_reporting(E_ALL);
ini_set('display_errors',true);
/*
Class to handle spidering, scraping, etc
How to use it:
- simplest way is to spiderStart then repeatedly call spiderNextPage and carry out whatever tasks you'd like on retrieved pages
Capabilities:
Spider from a start page matching links according to regexps (regexps can vary according to crawl depth)
Retrieve a page as a string
Extract Links from a page (optionally according to regexps)
CLASS: spiderScraper
1个匹配EMAIL的正则
Posted in PHP技术 on 2006/06/20 / 评论(0) »
/**
* Grab an e-mail address out of a string
*
* @param    int $level The log level. See sys_log() of the PHP docs
* @param    string $message The log message
* @access public
* @return void
*/
function get_email_from_string($email)
{
 if (preg_match("/(b)([w.-]+)(@)([w.-]+)([A-Za-z]{2,4})b/i", $email, $matches))
 {
   return $matches[0];
 } else
 {
   return false;
 }
}
?>
一个URL的正则
Posted in PHP技术 on 2006/06/20 / 评论(0) »
$html = "
<h1>Articles</h1>
<a class='cla1' target=_blank href='http://www.bac.com/database1/index.html' style='color:red'>数据库1</a>
<a class='cla1' target=_blank href='http://www.bac.com/database2/index.html' style='color:red'>数据库2</a>
";

preg_match_all("{<a[^>]+href\s*=\s*'(.+?)'[^>]*>(.+?)</a>}i", $html, $matches);


一个URL的正则 收藏自cid73
zend Debug Server
Posted in PHP技术 on 2006/06/19 / 评论(0) »
httpd.conf

<IfModule mod_mime.c>
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
</IfModule>

<Directory "D:\wwwroot/ZendStudioServer">
  Options Indexes
  DirectoryIndex index.html index.php
</Directory>



[Zend]
zend_extension_manager.optimizer_ts="D:\soft\Zend\ZendStudioServer-5.1.0\lib\Optimizer-2.6.1"
zend_extension_ts="D:\soft\Zend\ZendStudioServer-5.1.0\lib\ZendExtensionManager.dll"
zend_optimizer.optimization_level=15
zend_extension_manager.debug_server_ts="D:\soft\Zend\ZendStudioServer-5.1.0\lib\Debugger-5.1.0"
studio.install_dir="D:\soft\Zend\ZendStudioServer-5.1.0"
zend_debugger.expose_remotely=allowed_hosts
zend_gui.ini_modifier="D:\soft\Zend\ZendStudioServer-5.1.0\sbin\ini_modifier.exe"
zend_debugger.deny_hosts=
zend_gui_password=1e63bbb9760f7e977e7f3041f960ef06
zend_debugger.allow_hosts=127.0.0.1/32
zend_ini_file="D:\soft\Zend\ZendStudioServer-5.1.0\etc\zend.ini"


wwwfile

分页: 9/20 第一页 上页 4 5 6 7 8 9 10 11 12 13 下页 最后页 [ 显示模式: 摘要 | 列表 ]