PHP Classes

Remote MySQL Query: Execute remote MySQL queries across the Web

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 72%Total: 4,726 All time: 584 This week: 455Up
Version License PHP version Categories
remotequery 1.0Freely Distributable5.0PHP 5, Databases, Web services


Easily execute queries on a remote MySQL server using only HTTP.

It works by accessing a PHP script on the remote web server that executes queries based on passed in URL parameters.

The client passes a secret key to the remote script to prevent unauthorized access.

The remote script passes back the results to the requesting client using XML to marshal the data.

The class parses the results XML data returned by the server script and returns an array.

It, also, retrieves (into class variables) the number of records returned by the query and the time the query took to execute.

The server script may be used to execute MySQL queries that can be retrieved by programs written in other languages besides PHP.

Innovation Award
PHP Programming Innovation award nominee
July 2007
Number 5

Prize: One copy of the Zend Studio
Sometimes it is necessary to perform queries to databases that are in remote servers. However, firewall rules prevent accessing those databases from outside the network where the respective server machines are located.

This package provides a solution that circumvents that restriction. It uses a PHP script as a proxy in the same machine as the remote MySQL database server to perform remote queries via the Web.

This way the remote database can be queried by client scripts from remote machines. To use this solution, the client scripts can be in PHP or any other language.

Manuel Lemos
Picture of Jeff Williams
  Performance   Level  
Name: Jeff Williams <contact>
Classes: 7 packages by
Country: United States United States
Age: 43
All time rank: 384 in United States United States
Week rank: 360 Down38 in United States United States Down
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file remote_query_server.php Aux. Server file
Plain text file remotequery.class.php Class Client class
HTML file class_help.html Doc. Help for class
Accessible without login Plain text file example.php Example Example file

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:584
This week:455Up
User Ratings User Comments (3)
 All time
Good job.
11 years ago (Tomasz Malewski)
The package is beautiful and I love it.
12 years ago (Hans Cronander)
Great documentation, great functions: guys who gave mad marks...
15 years ago (Gregory BABAR)