That's just a sample. There is more to do before you can go to the final result. But if you have a patience, I believe : YES WE CAN
First, I want to know that your database info (dbname, dbuser, db pass) is correct. Create one file name test.php that contain only the following lines
For simplicity, put this in Web root (public_html/www directory). This is common if you're using cPanel.
Then at your browser, open test.php. If your domain name is kpforex.com, then you would enter
hxxp://kpforex_dot_com/test.php.
If at browser you got text "Selected database EAforex successfully" then you need one more important thing: create a table that will hold your trade info. This table should contained some trade info like:
ticket,
opentime,
position,
lotsize,
etc.
Let me what your result with the above test.php before going further with table creation.
For a motivation that it can be done, here is my test on my host.
hxxp://www_dot_mt4scripts_dot_com/read_trade.php
I'm posting the trade to my VPS from an EA that is running on strategy tester to speed up debugging.
First, I want to know that your database info (dbname, dbuser, db pass) is correct. Create one file name test.php that contain only the following lines
PHP Code
<?
$dbname = 'EAforex'; //ask host provider what's your database name
$username='EAforex'; //your db user name
$password='test'; //your password for db user name
$link = mysql_connect('localhost', $username, $password);
if (!$link) {
die('Not connected : ' . mysql_error());
}
echo "Connected to MySQL successfully<hr>";
$db_selected = mysql_select_db($dnmame, $link);
if (!$db_selected) {
die ('Error selecting $dbname with msg: '.mysql_error());
}
echo "Selected database $dbname successfully<hr>";
mysql_close($link);
Then at your browser, open test.php. If your domain name is kpforex.com, then you would enter
hxxp://kpforex_dot_com/test.php.
If at browser you got text "Selected database EAforex successfully" then you need one more important thing: create a table that will hold your trade info. This table should contained some trade info like:
ticket,
opentime,
position,
lotsize,
etc.
Let me what your result with the above test.php before going further with table creation.
For a motivation that it can be done, here is my test on my host.
hxxp://www_dot_mt4scripts_dot_com/read_trade.php
I'm posting the trade to my VPS from an EA that is running on strategy tester to speed up debugging.