php guys have a sec?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lil2rich4u2
    ICQ: 175171926
    • Oct 2002
    • 11046

    #1

    php guys have a sec?

    i have a script which generates a random link.

    how do i insert this into a txt link? I dont know how to call it in a url

    random.php

    [a href="random.php">click here for random site"[/a]

    thanks
    HEY!!

    Unbeatable hosting! Customer service is top notch!

    --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!
  • lil2rich4u2
    ICQ: 175171926
    • Oct 2002
    • 11046

    #2
    btw im calling it within an html file
    HEY!!

    Unbeatable hosting! Customer service is top notch!

    --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

    Comment

    • Brad Xtremepay
      So Fucking Banned
      • Dec 2003
      • 2000

      #3
      If it prints the result, include it with an SSI include. Or make it a php file and use (? include (""); ?)



      of course sub ( for <

      Comment

      • juicylinks
        So Fucking Banned
        • Apr 2001
        • 122992

        #4

        Comment

        • Myst
          Confirmed User
          • Feb 2004
          • 4708

          #5
          Originally posted by lil2rich4u2
          i have a script which generates a random link.

          how do i insert this into a txt link? I dont know how to call it in a url

          random.php

          [a href="random.php">click here for random site"[/a]

          thanks
          assuming that the script spits out a link, this is all you have to do
          [a href="[? include(your_script.php) ?]"> Random Site [/a]

          replace [ with <, and ] with >
          ICQ: 298-523-037

          Comment

          • lil2rich4u2
            ICQ: 175171926
            • Oct 2002
            • 11046

            #6
            Originally posted by Myst


            assuming that the script spits out a link, this is all you have to do
            [a href="[? include(your_script.php) ?]"> Random Site [/a]

            replace [ with <, and ] with >
            when i do this i see the actual code to call the link

            i see

            htp://domain.com/[? include(random.php) ?]
            HEY!!

            Unbeatable hosting! Customer service is top notch!

            --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

            Comment

            • lil2rich4u2
              ICQ: 175171926
              • Oct 2002
              • 11046

              #7
              someone said this would help if i add this to my htaccess

              didnt help, but ...

              AddType application/x-httpd-php .html
              HEY!!

              Unbeatable hosting! Customer service is top notch!

              --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

              Comment

              • Brad Xtremepay
                So Fucking Banned
                • Dec 2003
                • 2000

                #8
                Might help if we saw the code
                Otherwise it's like asking a mechanic to fix your car.
                But the car is 8 towns away and has no tires at the moment.

                Comment

                • Rorschach
                  So Fucking Banned
                  • Aug 2002
                  • 5579

                  #9
                  Originally posted by lil2rich4u2
                  someone said this would help if i add this to my htaccess

                  didnt help, but ...

                  AddType application/x-httpd-php .html
                  Is the page you're calling it from .htm? In which case you'd have to add .htm to the line above in your .htaccess. And does random.php actually return a url?

                  Comment

                  • lil2rich4u2
                    ICQ: 175171926
                    • Oct 2002
                    • 11046

                    #10
                    Originally posted by Brad Xtremepay
                    Might help if we saw the code
                    Otherwise it's like asking a mechanic to fix your car.
                    But the car is 8 towns away and has no tires at the moment.
                    the code works when i call it for a popup like this ...

                    !-- begin xit code
                    function xit()
                    {
                    open("[?include"random.php";?]","_blank");
                    }
                    // end xit code --
                    HEY!!

                    Unbeatable hosting! Customer service is top notch!

                    --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

                    Comment

                    • Brad Xtremepay
                      So Fucking Banned
                      • Dec 2003
                      • 2000

                      #11
                      The best way to fix this is copy/paste your entire html file
                      make a .php file
                      insert php code as seen in Myst's post.

                      Solved ;)

                      Comment

                      • lil2rich4u2
                        ICQ: 175171926
                        • Oct 2002
                        • 11046

                        #12
                        Originally posted by Brad Xtremepay
                        The best way to fix this is copy/paste your entire html file
                        make a .php file
                        insert php code as seen in Myst's post.

                        Solved ;)
                        cant do that, its a .shtml page and people are sending to the full url

                        :/

                        i also tried changing that line in htaccess, it did bad things lol

                        when i went to my site, it asked if i wanted to download my entire site haha
                        HEY!!

                        Unbeatable hosting! Customer service is top notch!

                        --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

                        Comment

                        • Alky
                          Confirmed User
                          • Apr 2002
                          • 5651

                          #13
                          if you use an include, your file extension has to be .shtml... otherwise you need to set up your html files to handle php.

                          Comment

                          • Alky
                            Confirmed User
                            • Apr 2002
                            • 5651

                            #14
                            Originally posted by lil2rich4u2
                            btw im calling it within an html file
                            cant do that, its a .shtml page and people are sending to the full url
                            make up your mind.

                            Comment

                            • lil2rich4u2
                              ICQ: 175171926
                              • Oct 2002
                              • 11046

                              #15
                              Originally posted by Alky


                              make up your mind.
                              sorry, i just meant it wasnt a php file.

                              so you saying i can use an include to do this?

                              i tried the ones listed above and it didnt work, any other ways?

                              i did this same thing once a long time ago .... we had the script called in the HEAD and set into a variable, then used the variable in the url

                              does that make any sense? I cant find the page though

                              :/
                              HEY!!

                              Unbeatable hosting! Customer service is top notch!

                              --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

                              Comment

                              • grumpy
                                Too lazy to set a custom title
                                • Jan 2002
                                • 9870

                                #16
                                why dont you do it in java?
                                I have a script for you wich does that. ( free ofcourse )
                                Don't let greediness blur your vision | You gotta let some shit slide
                                icq - 441-456-888

                                Comment

                                • lil2rich4u2
                                  ICQ: 175171926
                                  • Oct 2002
                                  • 11046

                                  #17
                                  Originally posted by grumpy
                                  why dont you do it in java?
                                  I have a script for you wich does that. ( free ofcourse )
                                  can you email it?

                                  [email protected]

                                  thanks!
                                  HEY!!

                                  Unbeatable hosting! Customer service is top notch!

                                  --> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!

                                  Comment

                                  • Alky
                                    Confirmed User
                                    • Apr 2002
                                    • 5651

                                    #18
                                    all your trying to do is call a php file from a shtml file?

                                    Comment

                                    • Alky
                                      Confirmed User
                                      • Apr 2002
                                      • 5651

                                      #19
                                      if so:
                                      PHP Code:
                                      <!--#include file="file.php" --> 
                                      
                                      should work

                                      Comment

                                      • Alky
                                        Confirmed User
                                        • Apr 2002
                                        • 5651

                                        #20
                                        by the way, thats not php above... just put it directly into your html.

                                        Comment

                                        • Stramm
                                          Confirmed User
                                          • Jan 2003
                                          • 342

                                          #21
                                          yup, try what Alky said.. this works. You can't parse html for php and ssi. So you need to decide for one. I guess your trade script already uses SSI so go for that.

                                          if the random.php is in the same dir as your shtml then use Alky's code...

                                          if not
                                          <!--#include virtual="/htdocs/somepath/random.php" -->

                                          Comment

                                          • Repetitive Monkey
                                            Confirmed User
                                            • Feb 2004
                                            • 3505

                                            #22
                                            Lil2rich4u2 never paid his programmer the pathetic $10 plus a hardcoded link he asked for that script. It's a script that sends an equal amount of traffic to the URLs of a flatfile database. Drama?

                                            Comment

                                            Working...