Connect An External Database Server With PHP

Oct 25, 2001

I Have two server, one in USA and one in Indonesia. I decide to apply mirror system for my portal.

The problem are, how my server in USA connect mysql server in my server in Indonesia?


Connect To External Server Via CURL

Aug 26, 2010

I want to connect to a external server to either copy image.jpg to my local computer or list all the files stored in a path.

How can I do this? I think cURL is used but examples on the web are not working for me.

For example:

Username: root
Password: 123123
Port: 22

View 4 Replies View Related

Connect To ORACLE Database On External Server?

Aug 6, 2010

I'm wondering how safe or if it's even possible to have a website pull data from a Oracle database on a remote server?What and how big are the security issues with this?

View 1 Replies View Related

Warning: Pg_connect() []: Unable To Connect To PostgreSQL Server

Feb 24, 2011

I want to connect to remote database from php to postgres but it could not connect and says

Warning: pg_connect() []: Unable to connect to PostgreSQL server:could not connect to server: No route to host (0x00002751/10065) Is the server running on host "xxxxxxxxx" and accepting TCP/IP connections on port 5432? in C:xampphtdocsest.php on line 4 Wrong CONN_STRING

$db = pg_connect(' port=5432 dbname=postgres user=postgres password=') or die('Wrong CONN_STRING');
if (!$db) {..................

The same database I can access from pgadmin client which is running over same machine where apache is running, I could not understand that pgadmin can access db but apache webserver's php could not access ?

View 2 Replies View Related

Connect To External Mysql Host

Nov 19, 2005

I have to connect to external mysql databse so that that i can import tables from that database. When i giving IP Address then this error displayed:

mysql_connect(): Lost connection to MySQL server during query in /home/pgcc/public_html/pgcc_tmn/modules/utility/index.php on line 9

Lost connection to MySQL server during query

and the code for above is : Code:

View 1 Replies View Related

Login - Connect To An External Website?

Feb 3, 2011

Let say i have a website (called with a login form. After you succesfully log on the website, you have a page with some status infos like : Ticket Closed. since...
And then ai have a page, on another server that need to go on, log me in and then retreive the date if the ticket is closed...

I dont really need all of the script how do i make the first part, connecting the webpage onto the webpage so ill be able to fetch data?

View 2 Replies View Related

Connect To An External Site Via A Php File?

Mar 17, 2007

I have tried this multiple ways and google searched my but off. I know this can be done. Anyone know how?

View 4 Replies View Related

Perform Operations On A Sharepoint Server File Store From An External Server?

Jul 30, 2010

I need to organise a bunch of files being stored on a Sharepoint server. I have a login to Sharepoint and privileges to modify files, but no access to any scripting or admin settings. The quickest way to make these changes currently is to "Open with windows explorer" - some kind of windows file server thingy, and that's very slow.

I want to know if it is possible to send requests, to make changes to the file structure, from an external server, preferably in PHP, but anything will do.

I need to be able to:

Get the details of the files in a folder
Create a folder
Move a file

View 1 Replies View Related

Active Directory On Local Server And Intranet On External Server?

May 6, 2010

I have a local Active Directory server and a external web server where my intranet is located.

$ad = ldap_connect("ldap://ip-address") or die("Couldn't connect to AD!");
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind( $ad, "user@domain", "password") or die("Can't bind to server.");

When I run this on a local web server it succesfully binds the connection. If I run the same code on the external server its unable to bind the ldap connection. Both port 389 and 636 is open on the AD server.I've tried google for an answer, but all the tutorials is for Active Directory and webserver on the same server. Is this even possible?

View 1 Replies View Related

See Requests Between My Localhost IIS Server And The External Google Server?

Jun 19, 2010

I have managed to get Fiddler monitoring my localhost traffic by specifying my machine name. I am using IIS7 (localhost) on Vista business. I'm developing using PHP and am currently using the Zend GData framework to communicate with Google Calendar.I am not seeing any communication between the IIS/Localhost server and the Google service. How can I see requests between my localhost IIS server and the external Google server. Obviously, I am seeing the result of the interaction in the browser but not the request/response between IIS and Google that is orchestrated by my PHP script and the Zend GData framework.

View 1 Replies View Related

Connect To SOAP Server From Java And Run Server Builtin Methods/services?

Apr 6, 2011

How can i connect from Java to my SOAP server and get the givemeSmile()methods?This does not work in Java, i was trying URLConnection but i think not possible with that?Is there any SOAP client libraries?

class Zend_Controller_Action


View 2 Replies View Related

Warning: Mysql_connect() [function.mysql-connect]: Can't Connect To MySQL Server

Aug 27, 2008

I'm having a new problem regarding posting an edited record in edit_form.php where the page contains mysql update functionality. For me, I seems to have no problem for mysql database connection in conncection.php dunno what to do with my coding as I have no idea regarding the problem shown as below:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10048) in C:Program Filesxampphtdocs otification_systemconnectionconnection.php on line 8 Could not connect: Can't connect to MySQL server on 'localhost' (10048) The Update form coding is shown in below:


View 7 Replies View Related

Could Not Connect To MySQL: Can't Connect To Local MySQL Server Through Socket

Dec 31, 2006

To connect to a MySQL database, hosted on my machine, an iMAC G5 with OS 10.4, I am using the following code:

$dbc = mysql_connect ('localhost', 'guestuser', &#65533;')
OR die ('Could not connect to MySQL: '.mysql_error() );

However, I receive an error message: Could not connect to MySQL: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2). MySQL server is running, and user name/password are valid.

View 1 Replies View Related

Connect To MySQL - Can't Connect To Local MySQL Server Through Socket

Mar 27, 2006

I've finished coding php, run it localhost and uploaded to my Apache server with Linux OS. However, I'm seemingly unable to connect to mysql at the server side. and received the following message: Could not connect to database: Can't connect to local MySQL server through socket '/tmp/mysql.sock'(111) What's this message abt? I tried to get into MySQL without php on the server. and received the same message at the console.

View 11 Replies View Related

Can't Connect With Mysql - Warning: "mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host 'DB_HOST' (11004)"

Jan 1, 2010

I try to connect to mysql but it doesnt work and I get this error "Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'DB_HOST' (11004) in C:xampphtdocsprojectprojectindex.php on line 35 Could not connect to DB_HOST" Here is the code for my index. php

Code: [Select]<?php

View 5 Replies View Related

Connect To A Pop Server Before Use The Smtp Server

Nov 4, 2005

A mail sent from a host to my smtp server is refused. This happens
because you have to connect to a pop server before you can use the
smtp server. Does anybody have any code to achieve this (PHPmailer doesn't work)?

View 4 Replies View Related

Can I Execute PHP From External/different Server?

Jan 29, 2004

Hopefully there are some experts out there that can help with this - I've done a bit of searching here but haven't found an answer yet.

The problem is, the site where I'm hosting a set of html files does not support PHP. I have another host which does support PHP. I need to have my html files located on the server which does not support PHP.

Is there some way I can execute my PHP scripts within a regular HTML file? I've seen references to using Javascript for this but no working examples (and none I could make work).

Unfortunately I can't get PHP on the site where I need it without redirecting my domain (among other things). If there is a way to execute the PHP remotely, that would be the preference..

View 1 Replies View Related

Upload To External Server

Dec 13, 2006

I am trying to create a file on another server with fopen. I don't know how I would get write access to an external server.

View 4 Replies View Related

Require_once From A External Server?

Dec 18, 2006

Can I do a include or a require_once from a external server?

For example require_one('')

I am creating a program and don't really want the clients to be able to see my database login information on their server.

View 8 Replies View Related

Mail To External Server?

Sep 1, 2006

I'm wondering, is there a way to send php email to an external smtp server, and if so how??

View 7 Replies View Related

Uploading To External Server?

Mar 19, 2010

I am trying to upload files with an upload.php program. This works fine on my localhost but not on my godaddy server.

This is the code:

$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
echo "The file ";


I was just wondering if I had to put my godaddy username and password in the code for it to work. And if I do, how

View 1 Replies View Related

Updating App From External Server?

Jun 2, 2011

I'm writing a little app in KohanaPHP framework. Suppose, this app will have some updates in future. Current version is for example v1.0.

What is the best and the most optimal way to:

check if there is some new version and if so, update files in current server from remote server

So far, I use cURL to get info form version.txt file in my remote file and then I compare it with constant variable in app engine. Then I use [URL] module to connect with server and update app.

View 2 Replies View Related

Require_once From External Server?

Nov 6, 2010

I'm modifying an existing site (on another host) to use dynamic content for their news page. The database resides on my server along with the CMS GUI. I simply need their news page to retrieve data from my database. Here is the initialization code I placed on their page:


View 6 Replies View Related

Captcha From External Server

May 11, 2007

Is it somehow possible to insert a captcha field into a form, such that i want the captcha's php file to on another server. The form's processing php file is also another servers.

View 7 Replies View Related

Php.ini External Mail Server

Nov 3, 2007

I have setup WAMP server on my computer and I want the server to use an external mail server (my webhosts). My computer is running Vista and the mail server I want to use it running Linux.

I can't figure it out from the PHP docs.

View 8 Replies View Related

Using External SMTP Server

Jul 19, 2007

I need some help with an script:

// send message
if($_POST[submit]) {

// check for suspected injection strings
foreach($_POST as $name => $value) {

// check for unexpected newline characters
foreach($_POST as $name => $value) {
if($name != 'message') filter_string($value);

$_POST = safe_data($_POST, 'display');.

View 2 Replies View Related

Accessing Files On External Server?

Jan 26, 2011

Is there any way to access files of Third party server using PHP?

View 3 Replies View Related

Javascript - Get All External Links From Server

Oct 30, 2010

I was wondering: what is the PHP equivalent of this JavaScript code:


I want to get all the external links from my server and then direct the users to a disclaimer page

View 1 Replies View Related

Request - Get Page From External Server?

Jul 7, 2009

I want to pass a function a string, which takes that string tacks it onto url. Then goes to that url and then returns the page to my server so I can manipulate it with JS.

View 3 Replies View Related

Use Phrase On Another (external) Site / Server?

Mar 6, 2010

Let's say I got a phrase called $online_users, how do I use this phrase on another (external) site/server? For instance so that I could put Chat (4) in which the 4 is the amount of online users (= $online_users).

View 5 Replies View Related

FTP Delete A File On An External Server?

Dec 11, 2009

I've two servers, one is a Linux Hosting server and another one is a Media Streaming Server.

Now using PHP i check whether there is a file in a Media Streaming Server which is unused and want to Delete it to save space. I'm able to connect FTP to Media Streaming server from Linux Hosting Server.

My Only Issue is how I can delete the file from the Media Streaming Server via PHP which is hosted in Linux Hosting Server. Does somebody any experience or can give me some leads??

View 1 Replies View Related

Downloading External Images To Server

Jun 25, 2007

I'm trying to write a script that simply downloads the daily Ziggy comic. The image URL for today's comic is and the six digits in the filename are today's date. Code:

View 1 Replies View Related

Compiling With Oracle Support For External Db Server?

Oct 4, 2001

I'm trying to compile PHP as an Apache module with Oracle-oci8 support.. and at the moment I'm not having much luck because 'configure' needs Oracle to be installed on the same machine. Unfortunately, there isn't a local copy of Oracle, and the databases I want to interact with are on another server.

Are there any workarounds for this or does Oracle need to be installed on the machine I'm compiling PHP on?

View 2 Replies View Related

Grabbing External Server/website Info

Jun 17, 2003

what kinds of information can I grab about an external server or web site from a php page?

View 3 Replies View Related

Create Thumbnails Of Pictures That Are In An External Server

Jan 15, 2007

I have a website made it in php 4.4 and I used Gd library in order to create thumbnails of pictures that are localy in my host, but now I need to create thumbnails of pictures that are in an external server, Gd library said I canôt do it..

View 1 Replies View Related

Upload External Image And Save It On Server?

Apr 30, 2011

I want be able to upload an image or just paste the URL of an image in order to upload it a sa profile picture for my website users.

the point is i dont wanna store the url but i want to have a copy of that image on my server because if that external image will be lost i dont want to lose it either...

i believe facebook and tumblr etc do so... what the php script or best practice to do that?

View 4 Replies View Related

Download An External File To A Server Via A Program?

Jul 3, 2010

I have written a WordPress plugin, and I am trying to find the best way of having the program check for updates on my server, and downloading them automatically at the user's request. This will basically be used to download extra features that I don't want to put into the WordPress repository due them not having the GNU license. I've coded the program to check for updates, what I am not sure about is the download part.

Should I use file_get_contents() and then fwrite() to write the results to a directory? I'm sure that's a way of doing it, but I am looking for the most cross-server safe way of doing this because the plugin is used by thousands of people on different setups, although they are all PHP, and most of them are PHP5+. I am afraid certain hosts may have some sort of security preventing me from doing this. Would cURL be a better option?

View 2 Replies View Related

Apache - Include On Localhost - But Not On External Server?

Sep 15, 2010

I'm running Ubuntu 10.04 with Apache2 and PHP5. I have a directory structure like this:


and the equivalent for body.These files both exist and they contain more php and html code. The only thing that shows up when I test the website on localhost (varwww) is the html outside of the PHP commands. There is no error message, it's as if the file is included but empty.It is exactly the same as on the website (not localhost) but it works perfectly on the website.

View 1 Replies View Related

Adding An External Server In Aptana Studio 3?

May 11, 2011

How can I add an external server in Aptana Studio 3, since there is no Servers view?

Here are some instructions on how to do it but they both use Windows > Show view > Servers which is no longer available in Aptana 3. With the console is possible? How?

I have a wamp server installed and I can run correctly php files stored inside the htdocs folder. Now I want to run those php files from Aptana but I was getting blank pages.

In Project > Run Configurations I noticed the "Use selected server" option but no possibilty to add a server there, so I used "Use base URL" together with "Append project name" and now I can run php files from Aptana but I am still wondering if it is the best option and how I could tell Aptana to use the wamp server.

View 1 Replies View Related

Fetch XML File Into A String From External Server

Jun 15, 2010

I am using the cURL function to fetch the XML file into a string from an external server. But I am not getting anything . If I took this 's0000450_e.xml' file and stored it on my host server, the content is returned.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xmlContents = curl_exec($ch);

View 23 Replies View Related

Read External Server File In Jquery?

Sep 27, 2010

i need to load an external html page in my codes


and i need my script reads this external html page is it possible to do such a thing in jquery or even in php ?

View 3 Replies View Related

How To Configure External Mail Server On Linux In PHP.ini

Mar 19, 2007

Is there anyway I can configure PHP email to use external mail server on Linux? I know you can do it on Windows.

I did an experience. I updated php.ini showed below. However I could not receive email.

myServerAddress does have SMTP mail server running.  Any comments?

[mail function]
; For Win32 only.
; SMTP = localhost
SMTP = myServerAddress
smtp_port = 25

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i

View 3 Replies View Related

Connect To Our FTP Server ?

Apr 27, 2010

I am trying to connect to our FTP server with the following script.I already have access via our FTP client (WSFTPpro) which works fine.When I use the PHP script (see below) I get the following error:Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/vhosts/mydomain/httpdocs/fidsdata/ftptest2.php on line 9

Warning: ftp_login() expects parameter 1 to be resource, boolean given in /var/www/vhosts/mydomain/httpdocs/fidsdata/ftptest2.php on line 16
Ftp connection has failed!Attempted to connect to for user myuser.
HP Code:

View 8 Replies View Related

Connect To SQL Server With SSL?

Feb 3, 2011

How do I connect to a SQL Server with SSL from PHP?

Edit I should be more elaborate on this. We have a php-mysql application. We need to save data on a SQL Server also. Initially we were using mssql_connect('server', 'db_user', 'db_pwd')
to connect to the remote SQL server. but now we need to send it over ssl.

We would like to use the existing ssl cert already on server (currently used by site on IIS as ssl cert) to make it so we can connect to SQL Server with secure connection.

View 2 Replies View Related

Can't Connect To A Sql Server?

Mar 3, 2011

I wrote code as below:


The server is Apache2.2, the version of Sql Server is 2005, the version of PHP is 5.2.5, and I remove the ; before extension=php_mssql.dll and there is a php_mssql.dll in the ext directory

View 1 Replies View Related