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)
-   -   php guys have a sec? (https://gfy.com/showthread.php?t=240889)

lil2rich4u2 02-22-2004 11:06 PM

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

lil2rich4u2 02-22-2004 11:09 PM

btw im calling it within an html file

Brad Xtremepay 02-22-2004 11:10 PM

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

:)

of course sub ( for <

Juicy D. Links 02-22-2004 11:11 PM

:helpme

Myst 02-22-2004 11:25 PM

Quote:

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 >

lil2rich4u2 02-22-2004 11:33 PM

Quote:

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) ?]

lil2rich4u2 02-22-2004 11:34 PM

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

didnt help, but ...

AddType application/x-httpd-php .html

Brad Xtremepay 02-22-2004 11:36 PM

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.

Rorschach 02-22-2004 11:37 PM

Quote:

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?

lil2rich4u2 02-22-2004 11:39 PM

Quote:

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 --

Brad Xtremepay 02-22-2004 11:41 PM

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 ;)

lil2rich4u2 02-23-2004 03:57 AM

Quote:

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

Alky 02-23-2004 03:59 AM

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

Alky 02-23-2004 04:00 AM

Quote:

Originally posted by lil2rich4u2
btw im calling it within an html file
Quote:

cant do that, its a .shtml page and people are sending to the full url
make up your mind.

lil2rich4u2 02-23-2004 04:03 AM

Quote:

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

:/

grumpy 02-23-2004 04:08 AM

why dont you do it in java?
I have a script for you wich does that. ( free ofcourse )

lil2rich4u2 02-23-2004 04:17 AM

Quote:

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!

Alky 02-23-2004 04:29 AM

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

Alky 02-23-2004 04:30 AM

if so:
PHP Code:

<!--#include file="file.php" --> 

should work

Alky 02-23-2004 04:31 AM

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

Stramm 02-23-2004 04:56 AM

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" -->

Repetitive Monkey 02-23-2004 10:37 AM

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?


All times are GMT -7. The time now is 04:42 AM.

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