I have this code below, thing is it only works on
certain servers with php and mysql.  Works on mine but
not on some other servers.  On mine it outputs and
does the tasks correctly.  But when I try on another
server all it outputs is a blank page.  No messages,
no error messages, just blank.  View Sources shows the
basic HTML tags.

Could someone try this and let me know what happens
please?  And if anyone knows a fix so it works on most
servers please let me know.

Is it my script error or are some servers admin's not
allowing the same privlidges as on my server and that
is why my script fails?


Script below:


            $usr = "USR";
            $pwd = "PASS";
            $db = "DB_NAME";
            $host = "localhost";

            $cid = mysql_connect($host,$usr,$pwd);

global $IP_RegExp_Match, $Host_RegExp_Match,
$IP_RegExp_Match =
$Host_RegExp_Match = '(' . $IP_RegExp_Match .
$Email_RegExp_Match = '[0-9a-z]([-_.+]?[0-9a-z])*(%' .

$Host_RegExp_Match .
    ')?@' . $Host_RegExp_Match;


"{mail.YOUR_MAIL_SERVER.com:110/pop3/notls}"; //Para

$mbox = @imap_open ($MAILSERVER,$user,$pass) or die
("Sorry can't connect -please check your settings");

$check = imap_mailboxmsginfo($mbox);
echo "Messages before delete: " . $check->Nmsgs . "<br

$headers = imap_headers($mbox);

if ($headers == false) {
   echo "There are no messages to be deleted.<br
} else {
   while (list ($key, $val) = each ($headers)) {

   for ($i = 1; $i <= imap_num_msg($mbox); $i++)
   $messageBody = imap_body($mbox, $i);

$messageBody = strip_tags($messageBody,
$messageBody = str_replace("\'", "", $messageBody);
$messageBody = str_replace("\\", "", $messageBody);
$messageBody = str_replace("\"", "", $messageBody);
$messageBody = str_replace("3D", "", $messageBody);

    global $color, $Email_RegExp_Match;
    $sbody     = $messageBody;
    $addresses = array();

    /* Find all the email addresses in the body */
    while(eregi($Email_RegExp_Match, $sbody, $regs)) {
        $addresses[$regs[0]] = $regs[0];
        $start = strpos($sbody, $regs[0]) +
        $sbody = substr($sbody, $start);


    /* Replace each email address with a compose URL
    foreach ($addresses as $email) {
        $body = str_replace($email, $comp_uri, $body);
   mysql_query ("update users SET email_setting='-1'
WHERE email='$email'") or die ("No");


if ($email) {

echo "Email: " . $email . "<br>\n";


imap_delete($mbox, 1);



$check = imap_mailboxmsginfo($mbox);
echo "Messages after delete: " . $check->Nmsgs . "<br


Find local movie times and trailers on Yahoo! Movies.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to