Re: Linking data from a different site and server
| From: | Andrey Hristov | Date: | Tue, 25 Sep 2001 14:22:06 +0000 |
| Subject: | Re: Linking data from a different site and server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68710@lists.php.net to get a copy of this message | ||
<?php
$ch = curl_init ("http://www.php.net/");
$fp = fopen ("php_homepage.txt", "w");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
?>
I think that by using CURL you can get the output of your script and add the content to the another
page on the other server, also
you can parse it to make modifications.
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "Sheni R. Meledath" <sheni@cyber-gear.com>
To: "PHP Masters" <php-general@lists.php.net>
Cc: "MySQL Masters" <mysql@lists.mysql.com>
Sent: Tuesday, September 25, 2001 5:09 PM
Subject: [PHP] Linking data from a different site and server
> Hi all,
>
> I have developed a MySQL/PHP application for one of our web sites. The PHP
> script extracts data from the MySQL database which is on the same server
> and displays the results.
>
> Now I want to display the same results on one of our other sites which is
> on a different server. I tried calling the same PHP3 script file from that
> site (require ('http://www.mysite.com/data.php3').
> But its not connecting
> to the MySQL database or displaying the results.
>
> This is for displaying a news ticker on various sites. The news is stored
> in a MySQL database on one server. I want to create a PHP script that
> displays news on various sites, by embedding the script.
>
> Awaiting your valuable suggestions to solve this issue.
>
> Regards
> Sheni R Meledath
> sheni@cyber-gear.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>