Page 1 of 1

importing text to site

Posted: Tue Apr 21, 2009 4:15 am
by deadroad503
i cant seem to find any other resource for this other than php and im not familiar with it. i want to be able to take a txt file that a friend uploads to their site and dynamically import it to my site when ever they update it. it also needs to have the css format of my site when it imports? the only ways i can think of this is php or sql and my experience says sql is exteremely messy when it comes to this. is php any better? if so can someone please help with the coding? thanks

Re: importing text to site

Posted: Tue Apr 21, 2009 12:03 pm
by Christopher
PHP and SQL are very different. You can use a PHP function like file_get_contents() to read your friends file.

Re: importing text to site

Posted: Tue Apr 21, 2009 2:15 pm
by deadroad503
i admit i dont know much about php. could someone post an example that i might be able to reference and get started with? thanks

Re: importing text to site

Posted: Tue Apr 21, 2009 3:45 pm
by Christopher
The manual is full of examples, plus use supplies comments and examples at the bottom of each page:

http://us.php.net/manual/en/function.fi ... ntents.php

Re: importing text to site

Posted: Tue Apr 21, 2009 5:14 pm
by deadroad503
kk thanks ill post a reply if i have any trouble with it.