Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-11-2004, 01:11 PM   #1
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Programmers or any others i got a ?

K

Need to setup a page that will grab the contents of file and list it . The page it grabs is a txt file....

How can i do this? Use a SSI includes?
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:12 PM   #2
Johny Traffic
Confirmed User
 
Join Date: Apr 2003
Posts: 5,461
I dont know sorry, but can I put my sig in one of Juicys threads anyway please
__________________


hosted flv's, hosted galleries, morphing rss feeds, free content, free sites, hosted blog
Johny Traffic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:12 PM   #3
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by Johny Traffic
I dont know sorry, but can I put my sig in one of Juicys threads anyway please
sure
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:12 PM   #4
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
a simple php page:

$fileToGrab = '/path/to/file.txt';

print ( implode('',file($file) );



if you don't need any special formatting.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:13 PM   #5
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by psili
a simple php page:

$fileToGrab = '/path/to/file.txt';

print ( implode('',file($file) );



if you don't need any special formatting.
thanks man ill test it now.
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:14 PM   #6
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
make sure you make note of how i didn't reference the second "file" variable correctly becuase I'm retarded


$fileToGrab = '';
print (implode('',file($fileToGrab)));
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:16 PM   #7
Johny Traffic
Confirmed User
 
Join Date: Apr 2003
Posts: 5,461
Quote:
sure
I'll be honest I didnt really even understand the question, let alone, know the answer
__________________


hosted flv's, hosted galleries, morphing rss feeds, free content, free sites, hosted blog
Johny Traffic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:30 PM   #8
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Quote:
Originally posted by psili
make sure you make note of how i didn't reference the second "file" variable correctly becuase I'm retarded


$fileToGrab = '';
print (implode('',file($fileToGrab)));
works like a charm.... now how do i get the output to be one item per line?
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:31 PM   #9
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
PHP Code:
<?php 
$fileToGrab 
'juicy.txt';
print (
implode('',file($fileToGrab)));
?>

thats what i got
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:35 PM   #10
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
You dumping to an HTML window ?

Try this:

$fileToGrab = "juicy.txt";

print ( preg_replace("/\n/","<br>",implode("",file($fileToGrab))) );



might not be the most elegant, but it should work.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:40 PM   #11
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
Quote:
Originally posted by psili
You dumping to an HTML window ?

Try this:

$fileToGrab = "juicy.txt";

print ( preg_replace("/\n/","<br>",implode("",file($fileToGrab))) );



might not be the most elegant, but it should work.
Or even easier, use nl2br()



<?
print nl2br(implode("",file("juicy.txt")));
?>
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:41 PM   #12
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Quote:
Originally posted by swedguy
Or even easier, use nl2br()



<?
print nl2br(implode("",file("juicy.txt")));
?>
See..... That's lovely right there.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2004, 01:43 PM   #13
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
niceeeeeeeeee

Now ill set up a cron job to update the php file.
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.