403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2bzend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/imap.php
<?php
$url = "https://dev2-console.spectra.co";
echo print_r(sendInfo($url)); exit;
function sendInfo($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
        curl_setopt($ch, CURLOPT_PORT, 443);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    }
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $output = curl_exec($ch);
    if (curl_errno($ch)) {
        $error_msg = curl_error($ch);
    }
    if (isset($error_msg)) {
        echo $error_msg;
    }
    curl_close($ch);
    return $output;
}

function sendInfoB2C($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $output = curl_exec($ch);
    if (curl_errno($ch)) {
        $error_msg = curl_error($ch);
    }
    if (isset($error_msg)) {
        echo $error_msg;
    }
    curl_close($ch);
    return $output;
}

exit;



$dom = new DOMDocument;
$dom->loadHTML('https://www.covid19india.org/state/CH');
$xpath = new DOMXpath($dom);
//$html = str_get_html('http://www.google.com/');

$heading = parseToArray($xpath, 'state-left');
//$content=parseToArray($xpath,'Normal-H');

var_dump($heading);
echo "<br/>";

//var_dump($content);
//echo "<br/>";

function parseToArray($xpath, $class) {
    $xpathquery = "//div[@class='" . $class . "']";
    $elements = $xpath->query($xpathquery);

    if (!is_null($elements)) {
        $resultarray = array();
        foreach ($elements as $element) {
            $nodes = $element->childNodes;
            foreach ($nodes as $node) {
                $resultarray[] = $node->nodeValue;
            }
        }
        return $resultarray;
    }
}

exit;

function validateDateYYYYYY($date, $format = 'd-M-y') {
    $d = DateTime::createFromFormat($format, $date);
    return $d && $d->format($format) == $date;
}

echo validateDateYYYYYY("20-May-20");
exit;
?>


<h1>Gmail Email Inbox using PHP with IMAP</h1>
<?php
if (!function_exists('imap_open')) {
    echo "IMAP is not configured.";
    exit();
} else {
    ?>
    <div id="listData" class="list-form-container">
        <?php
        /* Connecting Gmail server with IMAP */
        $connection = imap_open('{secure.emailsrvr.com:993/pop3}INBOX', 'prashant@catpl.co.in', 'Riddu@2020#') or die('Cannot connect to Gmail: ' . imap_last_error());

        /* Search Emails having the specified keyword in the email subject */
        $emailData = imap_search($connection, 'SUBJECT "Article "');

        if (!empty($emailData)) {
            ?>
            <table>
                <?php
                foreach ($emailData as $emailIdent) {

                    $overview = imap_fetch_overview($connection, $emailIdent, 0);
                    $message = imap_fetchbody($connection, $emailIdent, '1.1');
                    $messageExcerpt = substr($message, 0, 150);
                    $partialMessage = trim(quoted_printable_decode($messageExcerpt));
                    $date = date("d F, Y", strtotime($overview[0]->date));
                    ?>
                    <tr>
                        <td><span class="column">
                                <?php echo $overview[0]->from; ?>
                            </span></td>
                        <td class="content-div"><span class="column">
                                <?php echo $overview[0]->subject; ?> - <?php echo $partialMessage; ?>
                            </span><span class="date">
                                <?php echo $date; ?>
                            </span></td>
                    </tr>
                    <?php
                } // End foreach
                ?>
            </table>
            <?php
        } // end if

        imap_close($connection);
    }
    ?>
</div>

Youez - 2016 - github.com/yon3zu
LinuXploit