lorddemos90 Posted October 17, 2007 Share Posted October 17, 2007 How exactly would I set up a connecton to mysql in php, but through a proxy server and a port #. proxy.shr.secureserver.net on port 3128 I have no idea where to start, so Here's my code. <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_searchprg = "host.com"; $database_searchprg = "database"; $username_searchprg = "login"; $password_searchprg = "password"; $searchprg = mysql_pconnect($hostname_searchprg, $username_searchprg, $password_searchprg) or trigger_error(mysql_error(),E_USER_ERROR); ?> Quote Link to comment Share on other sites More sharing options...
derwert Posted October 21, 2007 Share Posted October 21, 2007 port 3128 is usually the sign of a HTTP squid proxy server. In order to do this you would need to use a SOCKS proxy server. A PHP class for using a SOCKS proxy can be found here ( http://www.phpclasses.org/browse/package/1822.html ) I think the cleanest way to do it would be to create a socket that's listening on the local host; connect to that address/port with php and make your mysql requests to that address. Then basically re-transmit that data using the SOCKS class and then return the results through the socket you have open. Quote Link to comment Share on other sites More sharing options...
lorddemos90 Posted November 12, 2007 Author Share Posted November 12, 2007 .....you pretty much lost me with that explaination. Are there any examples out there on how to do that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.