simple PHP script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • playa
    Confirmed User
    • Feb 2001
    • 6432

    #1

    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
    Confirmed User
    • Feb 2001
    • 1027

    #2
    Yeah I would like to get my hands on one too.. Speak up and let me and playa have a copy

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

    Comment

    • Shah
      Registered User
      • Jul 2001
      • 74

      #3
      I might I have something I could cook up. Hit me up on ICQ 15495114
      eClickz - Highest Paying Dialer

      Comment

      • altasexa
        Registered User
        • Jul 2001
        • 19

        #4
        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).]

        Comment

        • altasexa
          Registered User
          • Jul 2001
          • 19

          #5
          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).]

          Comment

          • altasexa
            Registered User
            • Jul 2001
            • 19

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

            Cheers,
            Dave.

            Comment

            • altasexa
              Registered User
              • Jul 2001
              • 19

              #7
              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).]

              Comment

              • Lane
                Will code for food...
                • Apr 2001
                • 8496

                #8

                i already sent him a code

                Comment

                Working...