[PHP] Connect local app to a web app

2009-02-05 Thread Jônatas Zechim
Hi there, i'm here again, but now with another doubt.

What's the best way to connect a local app write in php or php-gtk to a web
app writen in php.
The database is MySql, and i need to do this connection every 3s to check
data, get the data back and save into localhost database.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Connect local app to a web app

2009-02-05 Thread Jim Lucas
Jônatas Zechim wrote:
 Hi there, i'm here again, but now with another doubt.
 
 What's the best way to connect a local app write in php or php-gtk to a web
 app writen in php.
 The database is MySql, and i need to do this connection every 3s to check
 data, get the data back and save into localhost database.
 
 

Mysql replication... :)

-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Connect local app to a web app

2009-02-05 Thread Paul M Foster
On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:

 Hi there, i'm here again, but now with another doubt.
 
 What's the best way to connect a local app write in php or php-gtk to a web
 app writen in php.
 The database is MySql, and i need to do this connection every 3s to check
 data, get the data back and save into localhost database.
 

If you have control of the server, you can just set this up in a bash
script, using mysql commands, which connect to the remote and then then
local databases. I'm talking about cron running the script periodically.

Paul

-- 
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Connect local app to a web app

2009-02-05 Thread bruce
hi...

can you describe in psuedocode what you're trying to accomplish?

might be able to help if i have a better understanding of where you're
trying to go.



-Original Message-
From: Jônatas Zechim [mailto:zechim@gmail.com]
Sent: Thursday, February 05, 2009 11:25 AM
To: php-general@lists.php.net
Subject: [PHP] Connect local app to a web app


Hi there, i'm here again, but now with another doubt.

What's the best way to connect a local app write in php or php-gtk to a web
app writen in php.
The database is MySql, and i need to do this connection every 3s to check
data, get the data back and save into localhost database.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Connect local app to a web app

2009-02-05 Thread Alpár Török
2009/2/5 Paul M Foster pa...@quillandmouse.com

 On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:

  Hi there, i'm here again, but now with another doubt.
 
  What's the best way to connect a local app write in php or php-gtk to a
 web
  app writen in php.
  The database is MySql, and i need to do this connection every 3s to check
  data, get the data back and save into localhost database.
 

 If you have control of the server, you can just set this up in a bash
 script, using mysql commands, which connect to the remote and then then
 local databases. I'm talking about cron running the script periodically.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


You can set up a web service using XML-RPC or JSON-RPC , you don't
necessarily need a db

-- 
Alpar Torok


Re: [PHP] Connect local app to a web app

2009-02-05 Thread Alpár Török
2009/2/5 Alpár Török torokal...@gmail.com



 2009/2/5 Paul M Foster pa...@quillandmouse.com

 On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:

  Hi there, i'm here again, but now with another doubt.
 
  What's the best way to connect a local app write in php or php-gtk to a
 web
  app writen in php.
  The database is MySql, and i need to do this connection every 3s to
 check
  data, get the data back and save into localhost database.
 

 If you have control of the server, you can just set this up in a bash
 script, using mysql commands, which connect to the remote and then then
 local databases. I'm talking about cron running the script periodically.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 You can set up a web service using XML-RPC or JSON-RPC , you don't
 necessarily need a db

PS: I meant you don't need the db locally


 --
 Alpar Torok




-- 
Alpar Torok


Re: [PHP] Connect local app to a web app

2009-02-05 Thread Jim Lucas
Alpár Török wrote:
 2009/2/5 Alpár Török torokal...@gmail.com
 

 2009/2/5 Paul M Foster pa...@quillandmouse.com

 On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
 Hi there, i'm here again, but now with another doubt.

 What's the best way to connect a local app write in php or php-gtk to a
 web
 app writen in php.
 The database is MySql, and i need to do this connection every 3s to
 check
 data, get the data back and save into localhost database.

 If you have control of the server, you can just set this up in a bash
 script, using mysql commands, which connect to the remote and then then
 local databases. I'm talking about cron running the script periodically.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 You can set up a web service using XML-RPC or JSON-RPC , you don't
 necessarily need a db

 PS: I meant you don't need the db locally
 

except for the fact that the op said he wanted to *save* it to a *localhost 
database*.

 --
 Alpar Torok

 
 
 


-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RES: [PHP] Connect local app to a web app

2009-02-05 Thread Jônatas Zechim
Ok, i have a app running on a website writen in php that insert data into a 
database(web) every 3s all day long, and I need to get this data(every 3s too) 
and save into local database, both are mysql database, but I don't know the 
best way to do it, with socks, XML, XML-RPC.

Thanks

Zechim.

-Mensagem original-
De: Jim Lucas [mailto:li...@cmsws.com] 
Enviada em: quinta-feira, 5 de fevereiro de 2009 18:13
Para: Alpár Török
Cc: Paul M Foster; php-general@lists.php.net
Assunto: Re: [PHP] Connect local app to a web app

Alpár Török wrote:
 2009/2/5 Alpár Török torokal...@gmail.com
 

 2009/2/5 Paul M Foster pa...@quillandmouse.com

 On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
 Hi there, i'm here again, but now with another doubt.

 What's the best way to connect a local app write in php or php-gtk to a
 web
 app writen in php.
 The database is MySql, and i need to do this connection every 3s to
 check
 data, get the data back and save into localhost database.

 If you have control of the server, you can just set this up in a bash
 script, using mysql commands, which connect to the remote and then then
 local databases. I'm talking about cron running the script periodically.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 You can set up a web service using XML-RPC or JSON-RPC , you don't
 necessarily need a db

 PS: I meant you don't need the db locally
 

except for the fact that the op said he wanted to *save* it to a *localhost 
database*.

 --
 Alpar Torok

 
 
 


-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: RES: [PHP] Connect local app to a web app

2009-02-05 Thread Jim Lucas
Jônatas Zechim wrote:
 Ok, i have a app running on a website writen in php that insert data into a 
 database(web) every 3s all day long, and I need to get this data(every 3s 
 too) and save into local database, both are mysql database, but I don't know 
 the best way to do it, with socks, XML, XML-RPC.
 
 Thanks
 
 Zechim.
 
 -Mensagem original-
 De: Jim Lucas [mailto:li...@cmsws.com] 
 Enviada em: quinta-feira, 5 de fevereiro de 2009 18:13
 Para: Alpár Török
 Cc: Paul M Foster; php-general@lists.php.net
 Assunto: Re: [PHP] Connect local app to a web app
 
 Alpár Török wrote:
 2009/2/5 Alpár Török torokal...@gmail.com

 2009/2/5 Paul M Foster pa...@quillandmouse.com

 On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
 Hi there, i'm here again, but now with another doubt.

 What's the best way to connect a local app write in php or php-gtk to a
 web
 app writen in php.
 The database is MySql, and i need to do this connection every 3s to
 check
 data, get the data back and save into localhost database.

 If you have control of the server, you can just set this up in a bash
 script, using mysql commands, which connect to the remote and then then
 local databases. I'm talking about cron running the script periodically.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 You can set up a web service using XML-RPC or JSON-RPC , you don't
 necessarily need a db

 PS: I meant you don't need the db locally

 
 except for the fact that the op said he wanted to *save* it to a *localhost 
 database*.
 
 --
 Alpar Torok



 
 

Personally, I would look at mysql replication running locally on your mysql 
database.

It is handled completely by mysql.  No need to use other applications or 
languages to reproduce the replication ability already designed into mysql.



-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php