RE: [PHP-DB] relay response transactions between PHP scripts on different servers
| From: | Matthew Loff | Date: | Mon, 16 Jul 2001 05:51:15 +0000 |
| Subject: | RE: [PHP-DB] relay response transactions between PHP scripts on different servers | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-10433@lists.php.net to get a copy of this message | ||
You could use file functions with a URL:
$movie_site = fopen("http://www.site.com/MovieResponder.php?star="
.
urlencode($star) . "&year=" . urlencode($year), "r");
$movie_info = fread($movie_site, 10240);
fclose($movie_site);
-----Original Message-----
From: Ken Sommers [mailto:mrsql.php@worldnet.att.net]
Sent: Monday, July 16, 2001 1:40 AM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] relay response transactions between PHP scripts on
different servers
Here's the part that confuses me:
How does MovieResponder.php on your site get the results back to my site
and back to the browser/user who is visiting my site..?
ken
----- Original Message -----
From: "Matthew Loff" <matt@willetts.com>
To: "'Ken Sommers'" <mrsql.php@worldnet.att.net>; "'PHP DB
Mailing
List'" <php-db@lists.php.net>
Sent: Sunday, July 15, 2001 9:37 PM
Subject: RE: [PHP-DB] relay response transactions between PHP scripts on
different servers
>
> Ken--
>
> If you have access to that server with the SQL database... Then
> instead of creating an additional PHP script on the SQL server...
> Could you simply add a username/password that was allowed to access
> that particular database (read-only, of course) remotely?
>
> If that isn't an option, here's an idea:
>
> Transmit the $star and $decade variables to the MovieResponder.php
> (don't pass the SQL query directly-- that's a bad idea!)... Have the
> MovieResponder.php execute the SQL query, retrieve all results into an
> array, and serialize() the array, then pass the serialized data back
> to MovieInfo.php.
>
> I'm sure others will have other suggestions, and there are probably
> better ways to do it than this.
>
> Good luck!
>
>
> -----Original Message-----
> From: Ken Sommers [mailto:mrsql.php@worldnet.att.net]
> Sent: Monday, July 16, 2001 12:22 AM
> To: PHP DB Mailing List
> Subject: [PHP-DB] relay response transactions between PHP scripts on
> different servers
>
>
> Hello,
> suppose you have a MOVIES table in your database on your server at
> your hosting company. Suppose I want some MOVIE info from your
> database..the titles of all the Robert Deniro movies released in the
> 1980's. Can I get the info and relay it back to the user on MY site?
>
> Would it be something like this?:
>
> Suppose I have a php page on MY web site called MovieInfo.php
>
> MovieInfo.php creates a sql command string from info provided by the
> user at MY site.
>
> something like $sql=" select titles,dates from movies where star =
> 'Robert Deniro' and decade = '1980'"
>
> assume correct syntax.
>
> Suppose you have a PHp script on your site called MovieResponder.php
> that is designed to run the query and send the result back to MY
> script.
>
> The php page on MY web site called MovieInfo.php has something like
> this
> form:
>
> FORM method="post"
>
> action="https://www.yourserver.com/gateway/MovieResponder.php">
> <INPUT TYPE="hidden" NAME="x_ADC_URL"
> VALUE="https://www.myserver.com/MovieInfo.php">
> <INPUT TYPE="hidden" NAME="query" VALUE=$sql>
> <INPUT TYPE="submit">
> </FORM>
>
> etc? etc?
>
> how could it work?
>
> Ken
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
>