Infiltration
THEORY
Ethics
Observations
 
PRACTICE
Abandoned Sites
Boats
Churches
Drains/Catacombs
Hotels/Hospitals
Transit Tunnels
Utility Tunnels
Various
 
RESOURCES
Exploration Timeline
Infilnews
Infilspeak Dictionary
Usufruct Blog
Worldwide Links
Infiltration Forums home | search | login | register

Reply
Infiltration Forums > Private Boards Index > Web/Graphic Design > Call too(Viewed 3692 times)
Xanadu location:
Las Vegas NV
 
 |  | 
Call too
< on 3/5/2006 12:43 AM >
Posted on Forum: UER ForumQuote
I want to setup my homepage or just the area that displays news to be able to be changed with just a .txt file. Like I want too drop a file into /serv1/files/web/site/example.txt and then it changes the news on the main page based on that. My site is not hosted locally though, so it would have to look at my home based servers for it. Can I just have like a iframe read the .txt files?



"Hey Fat Dave. <--Period"
ian_evil location:
Providence, Rhode Island
 
 |  |  | AIM Message | Kaos Corporation
Re: Call too
<Reply # 1 on 3/5/2006 1:43 PM >
Posted on Forum: UER ForumQuote
As far as I know, that kind of setup is only possible with PHP. There might be some way to fenagle it with javascript that reads the text as a source, but its probably more trouble than its worth.

If its just a simple site, I'd say try blogger, and format your news page to match the rest of your site.

Its as simple as inputing your FTP info, building a simple template, and then publishing through blogger. I also like it because anyone with a blogger ID can be added to my community and be allowed to publish news.



[center][b]New England Industrial Culture Online[/b]
Stencil/Graffiti, Street Art - Industrial/Exprimental Music - Urban Exploration
"[i]We are the ones you had to dehumanize.[/i]"[/center]
Mr. Motts
Noble Donor
 
location:
Long Island and Brooklyn NY
 
 |  |  | opacity.us
Re: Call too
<Reply # 2 on 3/10/2006 2:28 AM >
Posted on Forum: UER ForumQuote
Any server side language that can read the contents of the file can do this quite easily (PHP, ASP, Perl, etc) but you'd need to know a little about the language and it has to be installed on your server.

If you don't want to use a server side language, the text files would need to be XML files (the raw text - example), then you'd have to write an xsl file that formats the data (like CSS - example). Put them together to get a designed XHTML page without any server side languages and you can do some complex formatting if so desired.

Learn XML - http://www.w3schools.com/xml/default.asp
Learn XSL - http://www.w3schools.com/xsl/default.asp


[last edit 3/10/2006 2:28 AM by Mr. Motts - edited 1 times]

Save the planet... kill yourself.
http://www.opacity.us/ - Abandoned Photography
kowalski   |  | 
Re: Call too
<Reply # 3 on 3/13/2006 7:42 PM >
Posted on Forum: UER ForumQuote
You can do it with javascript (and it's actually really straightforward), but it's slower because of course it doesn't execute until the client's already brought down the rest of the page.



ian_evil location:
Providence, Rhode Island
 
 |  |  | AIM Message | Kaos Corporation
Re: Call too
<Reply # 4 on 3/27/2006 3:09 AM >
Posted on Forum: UER ForumQuote
If your server supports PHP use this single line:
<?php include_once('dir/file.txt'); ?>

  • You must open and close the PHP section with <?php and ?> tags.
  • To access a directory above the current one, use '../file.txt'.
  • The text file can contain HTML formatting, JavaScript, PHP and pretty much anything else.
  • You can also use different extentions, like '.html', '.php' or whatever.


Use the include line on your dynamic page. If you build a table or something, you could set it up like this:
<table>
<tr><td>News Header</td></tr>
<tr><td><?php include_once('dir/file.txt'); ?></td></tr>
<table>


And then have your included txt file generage new table rows:
Plain text news entry one. Can include HTML, etc.</td></tr>
<tr><td>Plain text news entry two. And stuff.</td></tr>
<tr><td>Final plain text news entry. Leave table row open.


I bought a book on PHP for $20 about a week ago. I can already build dynamic pages, store data in a MySQL database and XSS your website to hell. Its stupidly easy and, besides the book completely free. Learn PHP.



[center][b]New England Industrial Culture Online[/b]
Stencil/Graffiti, Street Art - Industrial/Exprimental Music - Urban Exploration
"[i]We are the ones you had to dehumanize.[/i]"[/center]
Sinister Crayon location:
Colorado
 
 |  | 
Re: Call too
<Reply # 5 on 3/27/2006 11:07 PM >
Posted on Forum: UER ForumQuote
Posted by .(ian_evil)
I bought a book on PHP for $20 about a week ago. I can already build dynamic pages, store data in a MySQL database and XSS your website to hell. Its stupidly easy and, besides the book completely free. Learn PHP.


What's the title...?



Xanadu location:
Las Vegas NV
 
 |  | 
Re: Call too
<Reply # 6 on 4/1/2006 6:08 AM >
Posted on Forum: UER ForumQuote
I couldnt get the PHP call to funtion to work.



"Hey Fat Dave. <--Period"
ian_evil location:
Providence, Rhode Island
 
 |  |  | AIM Message | Kaos Corporation
Re: Call too
<Reply # 7 on 4/1/2006 11:01 PM >
Posted on Forum: UER ForumQuote
Did it return an error, or just not fuction? Your server needs to have PHP installed for this to work. If you got no error message, than PHP probably isn't available where you have your site hosted. On the other hand, if you got any error message (including a blank page - this means the script has halted), there could be something wrong with your scripting.



[center][b]New England Industrial Culture Online[/b]
Stencil/Graffiti, Street Art - Industrial/Exprimental Music - Urban Exploration
"[i]We are the ones you had to dehumanize.[/i]"[/center]
Xanadu location:
Las Vegas NV
 
 |  | 
Re: Call too
<Reply # 8 on 4/2/2006 10:50 PM >
Posted on Forum: UER ForumQuote
Nothing shows. but it does have PHP enabled.



"Hey Fat Dave. <--Period"
TylerDurden location:
Worcester, Ma
 
 |  |  | Urban Eden
Re: Call too
<Reply # 9 on 4/3/2006 5:06 AM >
Posted on Forum: UER ForumQuote
Posted by Mr. Motts
Any server side language that can read the contents of the file can do this quite easily (PHP, ASP, Perl, etc) but you'd need to know a little about the language and it has to be installed on your server.

If you don't want to use a server side language, the text files would need to be XML files (the raw text - example), then you'd have to write an xsl file that formats the data (like CSS - example). Put them together to get a designed XHTML page without any server side languages and you can do some complex formatting if so desired.

Learn XML - http://www.w3schools.com/xml/default.asp
Learn XSL - http://www.w3schools.com/xsl/default.asp


I was reading down thinking I'd be the only one to think of XML, but you beat me to it. Those links Motts provided are great I taught myself XML and XSL from w3 schools a few months ago and those were really helpful.

On a side note, Urban Eden does exactly this with code very similar to the PHP code given above.




[last edit 4/3/2006 5:08 AM by TylerDurden - edited 1 times]

Ever wanted to be a pirate? We're recruiting!
http://www.uer.ca/...howallpb.asp?fid=1
WEB PIRATES FOR LIFE!

Check out my new site!
Urban Eden

My Webdesign company:
Mad Hatter Web Solutions

Infiltration Forums > Private Boards Index > Web/Graphic Design > Call too(Viewed 3692 times)
Reply

Add a poll to this thread



This thread is in a public category, and can't be made private.

Powered by AvBoard AvBoard version 1.5 alpha
Page Generated In: 78 ms