473,800 Members | 2,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hi how to send sql query to remote server.

44 New Member
Hi,
I want to make online registration script. To do this I searched google and found that cURL can be used, to send a query to the remote sever and getting the data back.
Can you guys help me I'm not able to get any thing how to use cURL to send the query to remote server and getting back the result of the query.


thank in Advance.
Aug 8 '08 #1
7 5618
pbmods
5,821 Recognized Expert Expert
Heya, Mak.

Do you need to send a query to a SQL server or to a PHP server? What database server software are you running?
Aug 8 '08 #2
mak1084
44 New Member
Heya, Mak.

Do you need to send a query to a SQL server or to a PHP server? What database server software are you running?

I want to send to a php server. and im runnig a mysql. at both side i mean on both server.
how do i use curl is main concern here. Can i use url rewriting here but how?
Aug 9 '08 #3
pbmods
5,821 Recognized Expert Expert
Alrightey. Here's a quick tutorial that should get you started: http://blog.unitedheroes.net/curl/.
Aug 9 '08 #4
mak1084
44 New Member
Alrightey. Here's a quick tutorial that should get you started: http://blog.unitedheroes.net/curl/.

hey thanks for the link it really helped me. and now I can little understand the cURL but I still not understanding how to pass the sql query to the example.com get the result.

say my query will be

Select * from register where id = '$varible'
Aug 9 '08 #5
pbmods
5,821 Recognized Expert Expert
hey thanks for the link it really helped me. and now I can little understand the cURL but I still not understanding how to pass the sql query to the example.com get the result.

say my query will be

Select * from register where id = '$varible'
Does it have to go through a second PHP server, or can you directly connect to the SQL server (via mysql_connect() or the like) from your script?
Aug 9 '08 #6
mak1084
44 New Member
Does it have to go through a second PHP server, or can you directly connect to the SQL server (via mysql_connect() or the like) from your script?
Hey If the request goes from the php server then i have to write script on both server. and If I use mysql_connect() then all code will be in first server it self.

but dont you think giving a user name and pass to the from remote server will be safe?
Aug 9 '08 #7
pbmods
5,821 Recognized Expert Expert
Hey If the request goes from the php server then i have to write script on both server. and If I use mysql_connect() then all code will be in first server it self.
It seems to me like you'd have to duplicate the code on both servers anyway if you want to send inline queries. You might as well just duplicate the connection code.

but dont you think giving a user name and pass to the from remote server will be safe?
If your MySQL installation supports it, you can set the MYSQL_CLIENT_SS L flag to connect via SSL to keep your login credentials secure (http://php.net/mysql_connect).
Aug 10 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
4492
by: Bernie | last post by:
Greetings, I have 3 servers all running SQL Server 2000 - 8.00.818. Lets call them parent, child1, and child 2. On parent, I create a view called item as follows: CREATE view Item as select * from child1.dbchild1.dbo.Item union all select * from child2.DBChild2.dbo.Item
9
10227
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app. I tried sending keys in VB with SendKeys, as well as using keybd_event API, but I'm not able to send any keys. It works very well for any local applications, but I can't pass the keys remotely. Is there any way to do it? Thanks! Etienne
20
17642
by: xixi | last post by:
hi, we use db2 udb v8.1 on windows, i am trying to use federated database objects to create wrapper, even though i have update dbm cfg using federated yes, i still get error "the instance for the db is not enable for the specified action", do i miss sth else?
2
3041
by: Danny J. Lesandrini | last post by:
Our orders database exists inside our firewall but we have a web site hosted on an ISP server. If we wanted to give users the ability to query the status of their order in real time, we could just export a simple subset of data to our ISP, like customer name, order ID and status. Anyone ever do this? For example, if the status changed from REQUEST to QUOTE or from QUOTE to PRODUCTION, the AfterUpdate event of the Access application...
13
8107
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send data was received by the socket on the remote end? Can I count on that? Do I understand TCP correctly in that, it gives confirmation ? I do not expect, that a .Net based receiver got that data when socket.Send() terminates!
1
2559
by: traceable1 | last post by:
I have 2 SQL databases which are the same and are giving me different query plans. select s.* from hlresults h inner join specimens s on s.specimen_tk = h.specimen_tk where s.site_tk = 9 and s.location in ('ABC','WIAD') and s.date_collected between '2/1/2003' and '2/3/2006' order by s.location, s.date_collected
1
2293
by: chaitanya02 | last post by:
Hi All, Well- this question might have appeared several times on this forum- but would appreciate your reply on this: I have a asp page, where customers login with some username and the pwd, which are stored in sql. i should be using this user name and pwd and check if it is the same as the userid and the pwd in the sql 4 table..IF so then: display the download url which is in sql3 by querying the four tables.. These four tables are...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.