php請求頁面將返回的頁面發送email

來源:互聯網
上載者:User

標籤:

 

 

<?phprequire_once ‘CLI_config.php‘;require_once dirname(__FILE__).‘/../../../../common/framework_config.php‘;require_once dirname(__FILE__).‘/../../../../common/SiteSettings.php‘;$domain            = stripos($_SERVER[‘SERVER_NAME‘],‘dev‘) >= 0 ? ‘http://dev-mcc.planetart.com‘ : SiteSettings::getDomain(SITE_MCC);$htmlOverview    = file_get_contents($domain.‘/planetart_dashboard.php?overview_from_email_tablename=overview‘); //請求頁面返回html$htmlOP            = file_get_contents($domain.‘/planetart_dashboard.php?overview_from_email_tablename=op‘);                   $startStr        = ‘<div id="tabs"‘;$endStr            = ‘</div>‘;               $startDivIndex    = stripos($htmlOP, $startStr); //尋找"<div id="tabs""開始位置$endDivIndex    = strripos($htmlOP, $endStr);  //尋找"</div>"開始位置$htmlOP            = substr($htmlOP, $startDivIndex, $endDivIndex + strlen($endStr) - $startDivIndex); //截取整個div//OP is the first , overview is the second$html            = stristr($htmlOverview, $startStr, TRUE) . $htmlOP . ‘<h4><h4>‘ .  stristr($htmlOverview, $startStr);$html            = str_ireplace(‘<div id="tabs"‘, ‘<div class="tabs"‘, $html);$html            = str_ireplace(‘$("#tabs").tabs();‘, ‘$(".tabs").tabs();‘, $html);$html            = str_ireplace(‘$("#tabs").tabs(\‘select\‘, 0);‘,                               ‘$(\‘.tabs:eq(0)\‘).tabs(\‘select\‘,5);                               $(\‘.tabs:eq(1)\‘).tabs(\‘select\‘,0);                               $(\‘.tabs:eq(1)>div[id!="tab1"]\‘).hide();                               $(\‘.tabs:eq(0)>ul>li:lt(5)\‘).hide();                               $(\‘.tabs:eq(1)>ul>li:gt(0)\‘).hide();                                $(\‘span[id*="refresh"]\‘).parent().remove();                               $(\‘form[id="form_overview"]:eq(0)>br:eq(0)\‘).remove();‘,                               $html);$html            = str_ireplace(‘$("tr[name=\‘department\‘] span:contains(\‘Order Processing\‘)").parent().find(\‘a:gt(0)\‘).click();‘,                               ‘$(\‘.data_table:eq(0) tr[name="department"]:eq(0) a:eq(2)\‘).click();                               $(\‘.data_table:eq(1) tr[name="department"]:eq(0) a:eq(0)\‘).click();                               ‘,                                $html);$html            = str_ireplace(‘planetart_dashboard_listorders.php‘, ‘http://www.mycustomcase.com/planetart_dashboard_listorders.php‘, $html);//for debug use query string ‘?debug=t‘if(‘t‘ == getIfSet($_GET, ‘debug‘, ‘‘)){    echo $html;    exit;}else{    $mail         = new MailService();    $from_name         = ‘dashboard‘;    $from            = SiteSettings::$NOREPLY_EMAIL[0];    $to                = array(‘[email protected]‘,‘[email protected]‘,‘[email protected]‘);    $subject        = ‘dashboard email‘;    $text            = ‘‘;    $site_id        = 0;    $ret_email = $mail->sendMail($from_name, $from, $to, $subject,stripslashes($text), $site_id, array(), true, ‘‘, array());}?>

 

php請求頁面將返回的頁面發送email

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.