<?php
/************************************************************************
* Mailer v0.2.1-FINAL Start: 04/25/2004 *
<?php
/************************************************************************
* Mailer v0.2.1-FINAL Start: 04/25/2004 *
* -------------------------------------------------------------------- *
* Short description : Functions for the HTML extension *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Short description : Functions for the HTML extension *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
$check = substr($test, strpos($test, 'http://')); $check2 = $check;
// See ext-html.php if you want to add more URL ends...
foreach ($GLOBALS['url_ends'] as $end) {
$check = substr($test, strpos($test, 'http://')); $check2 = $check;
// See ext-html.php if you want to add more URL ends...
foreach ($GLOBALS['url_ends'] as $end) {
- if (ereg($end, $check)) $check = substr($check, 0, strpos($check, $end));
+ if (isInString($end, $check)) {
+ $check = substr($check, 0, strpos($check, $end));
+ } // END - if
- $text = substr($text, 0, strpos($text, $check2)) . generateDerefererUrl($check) . substr($text, strpos($text, $check2) + strlen($check));
+ $text = substr($text, 0, strpos($text, $check2)) . generateDereferrerUrl($check) . substr($text, strpos($text, $check2) + strlen($check));
// Finally remove the url from testing string (or we have a loop and maybe server overload!)
$test = substr($test, strpos($test, $check) + strlen($check));
// Finally remove the url from testing string (or we have a loop and maybe server overload!)
$test = substr($test, strpos($test, $check) + strlen($check));
$pos = strpos($test, '@');
$test2 = substr($test, 0, $pos);
$pos = strpos($test, '@');
$test2 = substr($test, 0, $pos);
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
// Remove email from testing string (see above why...)
$test = substr($test, strlen($check));
}
// Now put all parts together
// Remove email from testing string (see above why...)
$test = substr($test, strlen($check));
}
// Now put all parts together