remote sql database connection script php

  • HOME  • tutorials  • photos   • free grafics design    • questions and answers  • distance calculator  • maps
   



CATEGORIES
EXCEL TUTORIAL
SQL TUTORIAL
WEB INFORMATION
WINDOWS
JAVASCRIPT SCRIPTS
COMPUTER SECURITY
GRAFIC DESIGN
HTML
PHP
CSS STYLE
ATLAS OF THE WORLD
DEVELOPER
PHOTOSHOP
MAGAZINE
TOP LISTS
LATEST ARTICLES
md5 hash generator online tools windows linux c php
remove duplicates in html lines online javascript
documentgetelementbyid()innerhtml javascript set example
how to block processes from starting and running in windows xp
list of us american presidents with pictures
ucwords javascript convert online tool
hex to rgb converter javascript for colors online
letter-spacing css property for html pages
sql inject protection without complicated class php script and tutorial
how to insert decimal values into a sql table row
  home   PHP » REMOTE SQL DATABASE CONNECTION SCRIPT PHP
google ads
 
 
 

REMOTE SQL DATABASE CONNECTION SCRIPT PHP


Views: 32
REMOTE SQL DATABASE CONNECTION SCRIPT PHP




    Many people asking if is possible to acces and connect to a remote MySql database, if the connection is possible using a php script from a server with a SQL database wich is on another server.
Yes is possible.
   And sometimes this action can be extremely useful instead to use file_get_contents or curl or other HTTP methods that can consume extremely CPU resources leading to exceeding the CPU policy of hosting accounts.




php script:

<?

$server = "33.432.250.44"; //remote database server ip
$dbname = "nameofdatabase"; //remote database name
$user = "nameofuser"; //remote database username
$password = "password"; //remote database password

$link = mysql_connect($server,$user,$password) or die(mysql_error());
mysql_select_db($dbname);
 


$SQL = 'SELECT * FROM `table` ';
$result = mysql_query($SQL);
while($row = mysql_fetch_array($result)) {
$dt=''.$row['nameoftablerow'].'';
}
echo $dt;

?>



NOTE: 
 For almost all hosting servers ( where is remote SQL Database ) in cpanel you can to set (if the server settings request) allowing acces for the server ip where is the php script.
The section is named Remote MySql or something like this.


Articles related to REMOTE SQL DATABASE CONNECTION SCRIPT PHP
Zero result!

Tags:remote sql server connection,remote sql access,remote sql server connection string,remote query sql,




Leave a comment

Your name *
Your comment *
   Anti Spam code *

There are no comments on this article...Page not found!



the latest articles:
• MD5 hash generator Online tools Windows Linux C Php
• Remove duplicates in html lines online javascript
• documentgetElementById()innerHTML javascript set Example
• How to block processes from starting and running in Windows XP
• List of us american presidents with pictures
• Ucwords javascript convert online tool
• Hex to rgb converter javascript for colors online
• Letter-spacing CSS property for html pages
• SQL Inject protection without complicated class php script and tutorial
• How to insert decimal values into a SQL table row
what is the height of statue of liberty
hollywood movies
map from faisalabad to hasilpur pakistan
driving distance between tanga and bagamoyo
how to abbreviate million dollars
how long do butterflies live in captivity

 

eXTReMe Tracker