Hi,
I run a few sites and I want to log in my main site database when/if there
is a problem, (like a page not found or an unknown agent).
But I don't want to give direct access to my database to the other sites, so
how could I safely pass data, (without passwords), from one site to another?
Thanks.
Simon 5 2972
i think i follow your question,
Something i am doing is i built a listener... www.page12.com/errors.php (not a real url)
then in all my apps, i have an error class-- then i curl with a post
to errors.php.
i also use this for other stuff like tracking and all
Phil
Florent wrote: Hi,
I run a few sites and I want to log in my main site database when/if
there is a problem, (like a page not found or an unknown agent).
But I don't want to give direct access to my database to the other
sites, so how could I safely pass data, (without passwords), from one site to
another? Thanks. Simon
>i think i follow your question, Something i am doing is i built a listener... www.page12.com/errors.php (not a real url)
then in all my apps, i have an error class-- then i curl with a post to errors.php.
i also use this for other stuff like tracking and all
Phil
No, What I mean was if site A wants to send data to site B.
I guess I could "www.B.com/msg.php?a=10"
but what I was really after is site A sending long information to B without
redirecting to A
Simon
Florent wrote: I run a few sites and I want to log in my main site database* when/if there is a problem, (like a page not found or an unknown agent).
But I don't want to give direct access to my database to the* other sites, so how could I safely pass data, (without passwords), from one *site to another?
.... What I mean was if site A wants to send data to site B. I guess I could "www.B.com/msg.php?a=10" but what I was really after is site A sending long information to B without redirecting to A
This is entirely possible, but will likely result in a
performance drag. If you are prepared to live with it,
here are a few recommendations .
The easiest thing to do would be to implement a report
generator of sorts on site A and have site B request
reports by name. Example:
Site B code:
readfile('http://www.siteB.com/report.php?id=s tatus');
Site A code:
if (isset($_GET['id'])) {
$id = $_GET['id'];
} else {
die();
}
switch($id) {
case 'status':
$query = 'SELECT this FROM that ...';
break;
// many other cases here...
default:
die();
}
$result = mysql_query($qu ery);
while ($record = mysql_fetch_arr ay($result, MYSQL_NUM)) {
echo "<tr>\r\n";
foreach ($record as $field) {
echo "<td>$field </td>\r\n";
echo "</tr>\r\n";
}
}
In other words, site A would return fully-formatted HTML in
response to a request from site B. Alternatively, you can
return comma-separated or tab-delimited text and have it
formatted on site B.
A less secure alternative is to send actual queries from
site B to site A. The danger is that a hacker could send
a query which would destroy or modify your data. So if
you want to go this route, you will have to make sure that
the report generator script connects to the database as a
user with SELECT-only rights.
Finally, you can implement a Web service with a similar
functionality.. .
Cheers,
NC
> This is entirely possible, but will likely result in a performance drag. If you are prepared to live with it, here are a few recommendations .
Looking at your example I am not sure I understand where there would be a
performance lag. The easiest thing to do would be to implement a report generator of sorts on site A and have site B request reports by name. Example:
Site B code:
readfile('http://www.siteB.com/report.php?id=s tatus');
don't you mean 'www.siteA.com' rather?
Site B will request from SiteA...
In other words, site A would return fully-formatted HTML in response to a request from site B. Alternatively, you can return comma-separated or tab-delimited text and have it formatted on site B.
Does it really have to be html, CS or TD text?
Can it not be any format I like? The reason I ask is that I could return
encrypted text of some sort to be certain that the data is 'fairly' safe. A less secure alternative is to send actual queries from site B to site A. The danger is that a hacker could send a query which would destroy or modify your data. So if you want to go this route, you will have to make sure that the report generator script connects to the database as a user with SELECT-only rights.
I don't think i wwill go down this road. Finally, you can implement a Web service with a similar functionality.. .
A biut of an overkill wouldn't it be? Cheers, NC
Many thanks,
Regards
Simon
Florent wrote: Looking at your example I am not sure I understand where there would be a performance lag.
OK, if you allow site B direct access to site A's database
server, here's what going to happen:
1. Site B opens a TCP connection to site A's database
server.
That's it; a single step.
If you prefer to go through site A as an intermediary,
there's going to be an extra step involved:
1. Site B opens an HTTP connection to site A.
2. Site A opens a TCP or socket connection to its database
server.
Opening a connection takes time. In the first scenario,
only one connection needs to be opened. In the second
scenario, two connections need to be established.
NC> Site B code:
NC>
NC> readfile('http://www.siteB.com/report.php?id=s tatus'); don't you mean 'www.siteA.com' rather? Site B will request from SiteA...
Of course. My apologies for confusion.
NC> In other words, site A would return fully-formatted HTML in
NC> response to a request from site B. Alternatively, you can
NC> return comma-separated or tab-delimited text and have it
NC> formatted on site B. Does it really have to be html, CS or TD text?
No, it can be anything you want. HTML or text were just the
most obvious and easiest to implement examples.
Cheers,
NC This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kevin Lyons |
last post by:
Hello,
I am trying to get my select options (courses) passed correctly from
the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html
I am having difficulty getting the courses to pass the correct option
value and then be displayed at the following URL:
http://www.dslextreme.com/users/kevinlyons/selectResults.html
I am passing countries, products, and courses. The first two display
|
by: Kevin Lyons |
last post by:
Hello,
I am trying to get all of my form elements passed correctly from the
following URL:
http://www.dslextreme.com/users/kevinlyons/selectBoxes.html
to the following URL:
http://www.dslextreme.com/users/kevinlyons/selectResults.html
I am passing name, email, countries, cities, products, courses, etc.
The others display as they should on the subsequent page,
|
by: jr |
last post by:
Sorry for this very dumb question, but I've clearly got a long way to go!
Can someone please help me pass an array into a function. Here's a starting
point.
void TheMainFunc()
{
// Body of code...
TCHAR myArray;
DoStuff(myArray);
|
by: Russell |
last post by:
Hi there,
I'm currently creating a .NET Web Application and I have a question about
passing values from one screen to another. I previously used Session
variables in the code to store these values, however I can no longer use
this method because of my current website "Cloaking" the URL. (When site is
cloked, the session variables don't seem to work with frames)
Anyway, I was wondering if anyone could offer an alternative, I have tried...
|
by: Eric |
last post by:
Hello,
I am trying to come up with the best way to pass large amounts of data from
page to page, namely a data table.
The user needs to enter data into a form in one page and confirm it on
another. Session variables seem like the easiest, but I'm afraid of
crashing the server after deploying with a few hundred users as opposed to
just a few developers/testers. Any ideas?
| |
by: Vasantha peddireddy |
last post by:
I am posting a page to another page (form post). The data grid on the second
page is being populated with data. Now, on page load of the second page, I
would like to send the grid data on this page to the first page and populate
the grid on the first page with the same data on second page. Please let me
know how can I do this.
Thanks,
Vasantha
|
by: James Robertson |
last post by:
I am new to the ASP and VB thing so be kind. Question I have is that
I have created an ASPX web site to use as an E-Mail page. But I want
to use this for a lot of users. Can I create the link on the WEB site
to mail to passing a variable from the WEB site to the ASPX web site
to E-Mail to? Hope I explained this correctly.
This is a response from another group.
There was no way for you to know it, but this is a classic asp newsgroup....
|
by: TheSailor |
last post by:
Forgive me - I am a bit new to cURL and passing form elements from one site to the next...
If you can help with a HOW TO or by holding my hand a bit with examples - so I can learn - I would be in debt to you and very appreciative -...
1) I have several external sites with simple forms (see http://www.wichitahomecenter.com/enter/register.html
) where I collect data on servers I own or have access to...
2) I have, by certain trade...
|
by: DaTurk |
last post by:
If I call this method, and pass it a byte by ref, and initialize
another byte array, set the original equal to it, and then null the
reference, why is the original byte array not null as well? I thought
passing by reference, your passing the address in memory.
public bool DoSomething(ref byte data)
{
byte retVal = null;
try
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |