GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   simple PHP script (https://gfy.com/showthread.php?t=38608)

playa 09-12-2001 11:25 AM

simple PHP script
 
does anyone have a php script
that can pull up galleries
on a text file?

similar to what other sites do instead of updating the pages they just add galleries to a database.

i have a cgi one but wanted to get a php version

------------------
------------
Playa
icq#38147712
I ain't no NEWBIE
www.NoBSdialer.com

Makaveli 09-12-2001 11:37 AM

Yeah I would like to get my hands on one too.. Speak up and let me and playa have a copy http://bbs.gofuckyourself.net/board/smile.gif

------------------
Submit To Green ThumbsTGP.Com

Shah 09-12-2001 11:58 AM

I might I have something I could cook up. Hit me up on ICQ 15495114

altasexa 09-12-2001 03:59 PM

You mean something like this...

Code:

<?
$tgp = file('tgp.txt');
$line = current($tgp);
while ($line) {
        $field = explode(',',$line);
        echo '<a href="' . trim($field[1]) . '">' . trim($field[0]) . "</a>\n";
        $line = next($tgp);
}
?>

This chunk of code will read a text file called tgp.txt which should be in the following format -

Description,URL e.g. -

Gallery One,http://www.somedomain.com/gallery1.html
Gallery Two,http://www.somedomain.com/gallery2.html

Cheers,
Dave.

[This message has been edited by altasexa (edited 09-12-2001).]

altasexa 09-12-2001 04:07 PM

Quote:

Originally posted by altasexa:
You mean something like this...

Code:

$tgp = file('tgp.txt');
$line = current($tgp);
while ($line) {
  $field = explode(',',$line);
  echo '<a href="' . trim($field[1]) . '">' . trim($field[0]) . "</a>\n";
  $line = next($tgp);
}

This chunk of code will read a text file called tgp.txt which should be in the following format -

Description,URL e.g. -

Gallery One,http://www.somedomain.com/gallery1.html
Gallery Two,http://www.somedomain.com/gallery2.html

Cheers,
Dave.

[This message has been edited by altasexa (edited 09-12-2001).]


altasexa 09-12-2001 04:13 PM

OK, seems like the GFY BBS isn't formatting the code properly...if someone needs a copy - ICQ me 110609192

Cheers,
Dave.

altasexa 09-12-2001 04:16 PM

One more try...

Code:

$tgp = file('tgp.txt');
$line = current($tgp);
while ($line) {
  $field = explode(',',$line);
  echo '[a href="' . trim($field[1]) . '"]' . trim($field[0]) . "[/a]\n";
  $line = next($tgp);
}

Just replace the [ and ] with < and >

[This message has been edited by altasexa (edited 09-12-2001).]

Lane 09-12-2001 05:45 PM


i already sent him a code


All times are GMT -7. The time now is 01:19 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123