Friday, May 20, 2022

AS filter version 2

 <?php


/*
CALL for nothing to delete, just list all:

localhost/p1.php?x=0

CALL for specific second message to delete and list all:

localhost/p1.php?x=2

*/


function is_base64($s)
{
      return (bool) preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $s);
}

function get_between_data($string, $start, $end)
{
$pos_string = stripos($string, $start);
$substr_data = substr($string, $pos_string);
$string_two = substr($substr_data, strlen($start));
$second_pos = stripos($string_two, $end);
$string_three = substr($string_two, 0, $second_pos);
// remove whitespaces from result
$result_unit = trim($string_three);
// return result_unit
return $result_unit;
}


$user = "info@rubirosa.rs";
$pass = "Maja123";


//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}", $user, $pass);
//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}INBOX", $user, $pass);


$imap = imap_open("{mail.rubirosa.rs:110/pop3/notls}", $user, $pass);

//imap_delete($imap, 1);

if( $imap ) {
   
     //Check no.of.msgs
     $num = imap_num_msg($imap);

for ($x = 1; $x <= $num; $x++) {
  echo "The number is: $x <br>";
//  echo imap_qprint(imap_body($imap, $x));

$s= imap_qprint(imap_body($imap, $x));

$r = get_between_data($s,"base64"," ");

echo base64_decode($r);

$ss = " ";

$rr =  get_between_data($ss," "," ");

echo base64_decode($rr);

echo base64_decode($s);

if (is_base64($s)) {

  echo base64_decode($s);
}
else
{
  echo $s;
  //echo base64_decode($s);
 
}
 
  echo "<hr>";
 
  $header = imap_header($imap, $x);
$from = $header->from;
foreach ($from as $id => $object) {
    $fromname = $object->personal;
    $fromaddress = $object->mailbox . "@" . $object->host;

echo $fromname . "<br>";
echo $fromaddress;

}

  echo "<hr>";

}

//mn = message number

$mn = $_GET['x'];
$rb = intval($mn);

if ($rb > 0) {

imap_delete($imap, $rb);  //mark some message for delete with specific message number

imap_expunge($imap);    //delete marked message

}
else {
echo "Pogresan parametar za brisanje";  
 
}


     //close the stream
     imap_close($imap);
}

?>

++Do you need encouragement while typing the best code ever?
Try this:




Linux with Windows look:



ULTRA UBER BACKUP:


Freetube withot comercials:

Thursday, May 19, 2022

Anti-spam filter in PHP


<?php

function is_base64($s)
{
      return (bool) preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $s);
}

$user = "info@rubirosa.rs";
$pass = "djole123";

//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}", $user, $pass);
//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}INBOX", $user, $pass);


$imap = imap_open("{mail.rubirosa.rs:110/pop3/notls}", $user, $pass);

//imap_delete($imap, 1);

if( $imap ) {
   
     //Check no.of.msgs
     $num = imap_num_msg($imap);

for ($x = 1; $x <= $num; $x++) {
  echo "The number is: $x <br>";
//  echo imap_qprint(imap_body($imap, $x));

$s= imap_qprint(imap_body($imap, $x));

if (is_base64($s)) {

  echo base64_decode($s);
}
else
{
  echo $s;
}
 
  echo "<hr>";
 
  $header = imap_header($imap, $x);
$from = $header->from;
foreach ($from as $id => $object) {
    $fromname = $object->personal;
    $fromaddress = $object->mailbox . "@" . $object->host;

echo $fromname . "<br>";
echo $fromaddress;

}

  echo "<hr>";

}

/*

imap_delete($imap, 1);  //mark first message for delete

imap_expunge($imap);    //delete marked message

*/

     //close the stream
     imap_close($imap);
}

?>




PREY GAME FOR FREE:


OCR Goodies:


Thursday, April 28, 2022

pop3 check php



Potreban i dovoljan uslov: 

https://stackoverflow.com/questions/9654453/fatal-error-call-to-undefined-function-imap-open-in-php


Prvo koristimo:

https://www.php.net/manual/en/function.imap-body.php

da preuzmemo mejlove, a zatim naredbu za brisanje odredjenog mejla koji je sumnjiv, na primer ima nedozvoljeni tip fajla ili sadržaj:


imap_delete($mbox1);

https://www.tutorialspoint.com/php/php_functions_imap_delete.htm

https://www.php.net/manual/en/function.imap-delete.php



PRIMER:

<?php
$user = "miki@rubirosa.rs";
$pass = "RamboAmadeus";

$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}", $user, $pass);

if( $imap ) {
   
     //Check no.of.msgs
     $num = imap_num_msg($imap);

for ($x = 1; $x <= $num-1; $x++) {
  echo "The number is: $x <br>";
  echo imap_qprint(imap_body($imap, $x));
  echo "<hr>";
}

//imap_delete($imap, 1); //Delete first msg


/*
     if( $num >0 ) {
          echo imap_qprint(imap_body($imap, $num));
     }
*/



     //close the stream
     imap_close($imap);
}
?>


Malo bolje:

<?php
$user = "info@rubirosa.rs";
$pass = "Milena123";

//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}", $user, $pass);
//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}INBOX", $user, $pass);

$imap = imap_open("{mail.rubirosa.rs:110/pop3/notls}", $user, $pass);


if( $imap ) {
   
     //Check no.of.msgs
     $num = imap_num_msg($imap);
     
$header = imap_header($imap, $x);
$from = $header->from;
foreach ($from as $id => $object) {
    $fromname = $object->personal;
    $fromaddress = $object->mailbox . "@" . $object->host;
}    
     
     

for ($x = 1; $x <= $num; $x++) {
  echo "The number is: $x <br>";
  echo imap_qprint(imap_body($imap, $x));
  echo "<hr>";
 
  $header = imap_header($imap, $x);
$from = $header->from;
foreach ($from as $id => $object) {
    $fromname = $object->personal;
    $fromaddress = $object->mailbox . "@" . $object->host;


echo $fromname . "<br>";
echo $fromaddress;


}


  //echo imap_qprint(imap_header($imap, $x));


  echo "<hr>";



}

//imap_delete($imap, 1);

/*
     if( $num >0 ) {
          echo imap_qprint(imap_body($imap, $num));
     }
*/



     //close the stream
     imap_close($imap);
}
?>

Gore navedeno su osnovne stvari koje su potrebne ako želite da napravite antispam online servis.

by:
https://vsc-rs.blogspot.com/2022/05/vscrs-programming-website.html


FREE VPN OF YOURS:



THE BRAND NEW KDE distro:


An independent RLXOS:


An Italian Linux for Academia:


++



Sunday, April 24, 2022

QR code in Google Sheet

 https://www.howtogeek.com/795025/how-to-make-a-qr-code-in-google-sheets/


https://www.howtogeek.com/255540/the-last-windows-7-iso-youll-ever-need-how-to-slipstream-the-convenience-rollup/


https://restic.net/


https://stackshare.io/stackups/d3-vs-plotly-js



++

EXCEL REPEAT FIRST ROW when print and list:

Use this feature if you would like a title row (or rows) to print at the top of every page of your data in Excel.

Note:
If you want column headings to remain at the top of your sheet when scrolling within a spreadsheet, you will need to freeze the top row.

  1. Click the [Page Layout] tab > In the "Page Setup" group, click [Print Titles].
  2. Under the [Sheet] tab, in the "Rows to repeat at top" field, click the spreadsheet icon.
  3. Click and select the row you wish to appear at the top of every page.
  4. Press the [Enter] key, then click [OK].
  5. Select File > Print > "Show Print Preview" to see what the printed spreadsheet will look like.

Note:
If the [Print Titles] button is locked (greyed out), it may be because you are currently editing a cell or you have chart selected. If the "Rows to repeat at top" spreadsheet icon is locked, it may be because you have more than one worksheet selected within your workbook. To unlock either button, you can also try clicking [File] > "Print" > "Page Setup."