why this script don't work right now

Jul 24, 2012 at 11:36
771 Visa
6 Replies
Medlem sedan Jun 27, 2012   5 inlägg
Jul 24, 2012 at 11:36
hello dears
 i need programer to help me to make this script work
 any body help



<?php
echo '<html><head>
<link href=\'fx.css\' rel=\'stylesheet\' type=\'text/css\' media=\'screen\'>
<link href=\'fx.css\' rel=\'stylesheet\' type=\'text/css\'>
</head><body><div id=\'wrapper\'>';

if ($login_name=='') {
echo 'Enter your myfxbook account login and password:<br>
<form name=\'login\' method=\'POST\' action=\'fxbook.php\'>
login: <input type=\'text\' name=\'login_name\'> password: <input type=\'password\' name=\'login_pw\'>
<input type=\'submit\' value=\'show fxbook\'></form><br>';
}
else {

$login_string = '$login_name&password=$login_pw';
$url = 'https://www.myfxbook.com/api/login.xml?email=$login_string';

$login = file_get_contents($url);
$xml_sess = simplexml_load_string($login);
$sess = $xml_sess->session;

$url='https://www.myfxbook.com/api/get-my-accounts.xml?session=$sess';
$data = file_get_contents($url);
$xml_data = simplexml_load_string($data);

$i =0;
echo '<table class=\'dataTable\' cellpadding=\'3\'><tr><td width=\'50px\' align=\'left\'><b>Name</b></td><td width=\'50px

\'><b>Profit</b></td><td width=\'55px\'><b>Profit Abs</b></td><td width=\'50px\'><b>Balance</b></td><td width=\'50px

\'><b>Equity</b></td><td><b>DD</b></td><td width=\'55px\'><b>Age</b></td><td><b>Deposits</b></td><td width=\'55px

\'><b>Updated:</b></td><td></td></tr>';
foreach ($xml_data->xpath('//account') as $niks) {

    echo '<tr><td align=\'left\'><b>';
    echo $xml_data->accounts->account[$i]->name;
    echo '</b></td><td>';
    $profit = (double) $xml_data->accounts->account[$i]->profit;
    $deposits = (double) $xml_data->accounts->account[$i]->deposits;
    $withdrawals = (double) $xml_data->accounts->account[$i]->withdrawals;
    $net_deposits = $deposits-$withdrawals;
    $equity = (double) $xml_data->accounts->account[$i]->equity;
    $balance = (double) $xml_data->accounts->account[$i]->balance;
    $drawdown = (double) $xml_data->accounts->account[$i]->drawdown;
    $per = ($profit/$net_deposits)*100;
    $aper = (($equity-$net_deposits)/$net_deposits)*100;
    $nu = time();
    $start = strtotime($xml_data->accounts->account[$i]->creationDate);
    $looptijd = floor(($nu-$start)/(60*60*24));
    $update = strtotime($xml_data->accounts->account[$i]->lastUpdateDate);
    $updated = floor(($nu-$update)/60);
    if ($per > 0) {
        echo '<font color=\'green\'>+';
    }else{
        echo '<font color=\'red\'>-';
    }
    print round($per,2);
    echo '%</font></td><td>';
    if ($aper > $per) echo '<b>';
    if ($aper > 0) {
        $profit = 1;
        echo '<font color=\'green\'>+';
    }else{
        $profit = 0;
        echo '<font color=\'red\'>';
    }
    print round($aper,2);
    echo '%</font></td><td>';
    if ($aper > $per) echo '</b>';
    if($balance>$net_deposits){
        echo '<font color=\'green\'>';
    }else{
        echo '<font color=\'red\'>';
    }
    echo '€ ';
    echo round($balance,2);
    echo '</font></td><td>';
    if($equity>$net_deposits){
        echo '<font color=\'green\'>';
    }else{
        echo '<font color=\'red\'>';
    }
    echo '€ ';
    echo round($equity,2);
    echo '</font></td><td>';
    echo round($drawdown,2);
    echo '%</td>';

    echo '<td>$looptijd days</td><td>€ $net_deposits</td><td>';
    if($updated > 30) echo '<font color=\'red\'><b>';
    echo '$updated Min';
    if($updated > 30) echo '</b></font>';
    echo '</td><td>';
    echo '<img src=\'https://mobile.myfxbook.com/system-spark.png?id=';
    echo $xml_data->accounts->account[$i]->id;
    echo '\'></td></tr>';
    $i++;

}
echo '</table>';


$url = 'https://www.myfxbook.com/api/logout.xml?session=$sess';
$logout = file_get_contents($url);
$xml_logout = simplexml_load_string($logout);
}

echo '</div></body></html>';
    
                
?>
Medlem sedan Jun 27, 2012   5 inlägg
Jul 24, 2012 at 17:06
14 views and no one can help or leave a comment
cleverforex
forex_trader_65241
Medlem sedan Feb 10, 2012   3 inlägg
Jul 24, 2012 at 17:06
i have the same problem....it doesnt work for me....
Medlem sedan Mar 07, 2010   60 inlägg
Jul 25, 2012 at 06:09
what's not working? do you get any errors?
aaa
Medlem sedan Jun 27, 2012   5 inlägg
Jul 25, 2012 at 06:09
there is any body can help for this ?
Medlem sedan Jun 27, 2012   5 inlägg
Jul 25, 2012 at 15:16
yeah this script i use it to see my acc in my website and now don't work probably

Medlem sedan Jun 27, 2012   5 inlägg
Jul 26, 2012 at 05:41

cleverforex posted:
i have the same problem....it doesnt work for me....

do u know any body can fix this problem
Logga in / Registrera dig to comment
You must be connected to Myfxbook in order to leave a comment
*Kommersiell användning och skräppost tolereras inte och kan leda till att kontot avslutas.
Tips: Om du lägger upp en bild/youtube-adress bäddas den automatiskt in i ditt inlägg!
Tips: Skriv @-tecknet för att automatiskt komplettera ett användarnamn som deltar i den här diskussionen.