Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   как через Сurl заинклудить файл с другого сайта (https://forum.antichat.xyz/showthread.php?t=203982)

ufalog 14.05.2010 15:19

как через Сurl заинклудить файл с другого сайта
 
есть файл 1.txt (http://site1.ru/1.txt)

есть сайт http://site2.ru/index.php

что нужн вставить в тело index.php чтобы в нем отобразилась информация из файла http://site1.ru/1.txt

file_get_contents не работает
хочу реализвать на Сurl :o

LStr1ke 14.05.2010 15:37

$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, "http://site1.ru/1.txt");
echo curl_exec($ch);


Время: 13:07