Page 1 of 2
is this possible? (newbie question)
Posted: Sat Aug 26, 2006 10:21 pm
by cursed
Is it possible to show a php function when theres a script on that page? and when the script is removed, then the php function doesnt show?
Thanks in advance, i just started coding PHP

Posted: Sat Aug 26, 2006 11:50 pm
by feyd
Please elucidate.
Posted: Sun Aug 27, 2006 1:49 am
by Christopher
It in interesting because you probably want to do something fairly straightforward that we could easily give you help on, but you are using words that don't have specific meanings to programmers. For example, functions are called and the code within them run -- they are not "showed." And, the statements "when there is a script on that page" and "when the script is removed" part is confusing. Scripts are not on or removed from pages. A PHP script is a file with a .php file extension that has embedded PHP code.
Posted: Sun Aug 27, 2006 3:14 am
by RobertGonzalez
If it hasn't become painfully clear, before we can help you we need to know what you need help with. Please ask your question in clearer terms that we can easily understand and answer. Thanks.
Posted: Sun Aug 27, 2006 12:08 pm
by cursed
sorry about the first post, i was in a hurry.
If a script is on a page, then it will affect another page on a different site(It will show a script.)
If a script isn't on the page, then it wont show a script on a different site.
I hope I'm clear enough this time.
Posted: Sun Aug 27, 2006 12:13 pm
by Ollie Saunders
No idea, post some code.
Posted: Sun Aug 27, 2006 1:56 pm
by feyd
I think we're going to need a lot more description and possibly your definitions of various terms you use.
Posted: Sun Aug 27, 2006 3:04 pm
by cursed
ok, 1 more time.
If a script is on a page, then it will show
If a script isn't on the page, then it will show this:
this time i hope i was clear..
Posted: Sun Aug 27, 2006 3:13 pm
by Ollie Saunders
What is your definition of a script?
Posted: Sun Aug 27, 2006 3:14 pm
by feyd
Not exactly enough.
How is it supposed to determine if a script is on a page? Is this page local or remote to this hypothetical script? Does this script have access to the internals of said page?
Posted: Sun Aug 27, 2006 3:15 pm
by cursed
a PHP script...
but if this can be accomplished wit hsomething else, please let me no.
Posted: Sun Aug 27, 2006 3:18 pm
by Ollie Saunders
If there isn't a script how is it supposed to output anything?
What is the problem you are trying to solve. Why do you need to determine "if a script is on a page"?
Do you actually know what PHP is? PHP never exists on a page, PHP generates the page in the first place the browser never sees PHP.
Posted: Sun Aug 27, 2006 3:22 pm
by cursed
because im making this because of a affilate type script.
So i can verify if someone is acturally affilating or not.
yes, i know php doesnt exist on a page, and this script should have access to the "internals" of the said page.
Posted: Sun Aug 27, 2006 3:27 pm
by Ollie Saunders
How, as a human looking at the page, are you able to tell if a page features an affiliate?
Posted: Sun Aug 27, 2006 3:30 pm
by cursed
if it shows an image(affilate button) which is part of a script.
but i know how to do that, ijust need help with the above.