To use chat, please login.
Back to contacts

why this script don't work right now

modyfx
Jul 24 2012 at 11:36
5 messages
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=\'?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>';
    
                
?>

modyfx
Jul 24 2012 at 17:06
5 messages
14 views and no one can help or leave a comment

cleverforex
Jul 24 2012 at 17:06
3 messages
i have the same problem....it doesnt work for me....

aj901512 (aj901512)
Jul 25 2012 at 06:09
60 messages
what's not working? do you get any errors?

modyfx
Jul 25 2012 at 06:09
5 messages
there is any body can help for this ?

modyfx
Jul 25 2012 at 15:16
5 messages
yeah this script i use it to see my acc in my website and now don't work probably


modyfx
Jul 26 2012 at 05:41
5 messages

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


do u know any body can fix this problem

Veuillez vous connecter pour pouvoir commenter.