Note that there are some explanatory texts on larger screens.

plurals
  1. POget link with imap connection
    primarykey
    data
    text
    <p>I connect to my gmail account via this code</p> <pre><code>$hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; $username = 'myacount@gmail.com'; $password = 'password'; /* try to connect */ $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error()); /* grab emails */ $emails = imap_search($inbox,'all'); /* if emails are returned, cycle through each... */ if($emails) { /* begin output var */ $output = ''; /* put the newest emails on top */ rsort($emails); /* for every email... */ foreach($emails as $email_number) { /* get information specific to this email */ $overview = imap_fetch_overview($inbox,$email_number,0); $message = imap_fetchbody($inbox,$email_number,2); $message=strip_tags($message); /* output the email header information */ $emai=split("&lt;",$overview[0]-&gt;from ); echo 'Lus ou pas : '.($overview[0]-&gt;seen ? 'lue' : 'Non Lue').'&lt;br&gt;'; echo 'subject : '.$overview[0]-&gt;subject.'&lt;br&gt; '; //echo 'from : '.$overview[0]-&gt;from.'&lt;br&gt;'; echo 'from : '.$emai[0].' + '.$emai[1].'&lt;br&gt;'; echo 'date : '.$overview[0]-&gt;date.'&lt;br&gt;'; /* output the email body */ echo 'Message '.rawurlencode(utf8_decode(rawurldecode($message))).'&lt;br&gt;'; break; } echo "&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;hr&gt;&lt;br&gt;&lt;br&gt;"; } /* close the connection */ imap_close($inbox); </code></pre> <p>in my account I have one email her body have </p> <pre><code>http://www.test.com?id=4 </code></pre> <p>but when I execute my script I have her in my browser</p> <pre><code>Lus ou pas : Non Lue subject : test from : =?ISO-8859-1?Q?fai=E7al_name?= + myacount@hotmail.com&gt; date : Mon, 24 Sep 2012 13:39:11 +0000 Message %0D%0A%0D%0A%0D%0A%3D0A%3D%0D%0A%3D0A%3D%0D%0A%3D0A%3D%0D%0Ahttp%3A%2F%2Fwww.test.com%3Fid%3D3D4%20%09%09%20%09%20%20%20%09%09%20%20%20%09%09%20%09%20%20%20%3D%0D%0A%09%09%20%20%0D%0A%3D%0D%0A </code></pre> <p>how can I get the link exactly.</p> <p>Ps : English Is not my mother tongue, sorry for any mistakes.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload