smarcus3
Members-
Posts
22 -
Joined
-
Last visited
Never
Everything posted by smarcus3
-
Well I guess its good since it forced me to change my password.
-
Thanks to whatever admin removed my credentials.
-
Ill do that now. Thanks. I've been careful to delete my pass every time but of course on the last post i mess up.
-
Also if someone wants to see the output please use this link. http://smarcus3.x10.mx/ Here is the complete index.php code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="author" content="" /> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> <title></title> </head> <body> <?php $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "xxx@gmail.com","xxx", OP_READONLY) or die ("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.gmail.com}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br />\n"; echo "Recent: " . $status->recent . "<br />\n"; echo "Unseen: " . $status->unseen . "<br />\n"; echo "UIDnext: " . $status->uidnext . "<br />\n"; echo "UIDvalidity:" . $status->uidvalidity . "<br />\n"; } else { echo "imap_status failed: " . imap_last_error() . "\n"; } ?> </body> </html> [/Code] EDIT (KP) Removed credz
-
thanks drco2 just figured it out. Thanks all for all the help. Using a server such as x10 which allows 993 connections is definetly key. I hope this thread can help someone else now. This server is also free.
-
Here is the working code $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "********@gmail.com","********", OP_READONLY) or die ("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.gmail.com}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br />\n"; echo "Recent: " . $status->recent . "<br />\n"; echo "Unseen: " . $status->unseen . "<br />\n"; echo "UIDnext: " . $status->uidnext . "<br />\n"; echo "UIDvalidity:" . $status->uidvalidity . "<br />\n"; } else { echo "imap_status failed: " . imap_last_error() . "\n"; } [/Code]
-
My IMAP No longer gives me an error!!!!!!!!! but how do I count unread messages. I switched over to 10x hosting.
-
Yes. I could try using pop port 995?
-
Im using 000WebHost now.
-
When I use this code .... $email = 'st********us@gmail.com'; $pass = '********'; $inbox = imap_open('{imap.gmail.com:993/imap/ssl}INBOX', $email, $pass, NULL, 1) or die('Cannot connect to Gmail'); [/Code] I get this error now [Code]Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/a6807236/public_html/default.php on line 56 Cannot connect to Gmail[/Code]
-
That code doesn't work either It still times out.
-
I am now using 000webhosting which after talking to their IT they stated they support IMAP_OPEN but I still get the time out error. I know this has already been talked about on other threads, but do you know of a free host which does allow this. I have tried many now.
-
echo file_get_contents("http://google.com"); returned 301 Moved The document has moved here. [/Code] but my connect always times out still. I even tried using a different gmail account with only a few emails in it.
-
Also the page is here if that helps you. http://smarcus3.x11s.org/
-
When I use your code I get this error Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/authuser=<steven.g.marcus@gmail.com>}INBOX in /home/u332547992/public_html/default.php on line 45 can't connect: Can't connect to gmail-imap.l.google.com,993: Connection timed out
-
This is all that it says ... Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com}INBOX in /home/u332547992/public_html/default.php on line 45
-
I cant get this to work and I found a host with imap-ssl here is my code though i've been messing around with it. It cant get the imap_open to work. $mbox = imap_open ("{imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}Inbox", "username", "password", OP_READONLY) or die("can't connect: " . imap_last_error()); $check = imap_mailboxmsginfo($mbox); echo $check->Unread; / Please please help. Thanks
-
oh yeah a free host.
-
I think it was due to the host I was using. Know of a host that allows the use of IMAP_OPEN????
-
thanks but that didn't work. Still gives this error Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX in /home/u984345410/public_html/default.php on line 41
-
I am trying to run this but it wont work. I get the following error. Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}Inbox in /home/u984345410/public_html/default.php Here is a snipit of the code function CountUnreadMails($login, $passwd) { $mbox = imap_open("{imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}Inbox", $login, $passwd, OP_READONLY); $count = 0; if (!$mbox) { echo "Error"; } else { $headers = imap_headers($mbox); foreach ($headers as $mail) { $flags = substr($mail, 0, 4); $isunr = (strpos($flags, "U") !== false); if ($isunr) $count++; } } imap_close($mbox); return $count; }