Ask a Question related to PHP Development, Design and Development.
-
Mark #1
PHP Command/Code to work out where its being accessed/run from?
Hi,
Is there a simple way to work out where the code is being run from?
For example, you goto [url]www.mydomain5.co.uk[/url], when the index.php is run, it
knows you are accessing [url]www.mydomain5.co.uk[/url] and stores the information
accordingly, so that you could do :-
$hostdomain = $_getmydomain (obviously this isnt the correct command name)
echo"Thanks for visiting ".$hostdomain."<br>";
for example?
Thanks, Mark
Mark Guest
-
Programing code for the Reset Page Origin command
Does anyone know the code for the Reset Page Origin command so I can either add it to an action or include it in a script? Actions do not accept... -
Msg command doesn't work with AT scheduler
Hello~. I made batch file, "eventlog.bat" to read 2003 server event automatically in my desktop. following batch file runs well when I click... -
DataGrid Command Doesn't work
Hi, I have this column in my DataGrid: <asp:ButtonColumn DataTextField="site_name" HeaderText="Name" CommandName="Select1"> <ItemStyle... -
What code would I use to ensure a page is accessed by another within my site?
I'm trying to prevent "leeching"..so that users must enter my site to get to the files. Does anyone know a script that will work? Thanks a... -
Using 'Shell' command in code.
Hi, Has anyone had a problem using a 'Shell' command within code for webservice method? Are there any premission settings that allow/prohibit this?... -
Steven Stern #2
Re: PHP Command/Code to work out where its being accessed/run from?
On Wed, 13 Oct 2004 13:05:32 GMT (more or less), "Mark"
<mark_news@horsemad.co.uk> wrote:
Create a page with>Hi,
>
>Is there a simple way to work out where the code is being run from?
>
>For example, you goto [url]www.mydomain5.co.uk[/url], when the index.php is run, it
>knows you are accessing [url]www.mydomain5.co.uk[/url] and stores the information
>accordingly, so that you could do :-
>
>
>$hostdomain = $_getmydomain (obviously this isnt the correct command name)
>echo"Thanks for visiting ".$hostdomain."<br>";
>
<? phpinfo() ?>
and you'll see the variables available to your scripts.
Steven Stern Guest
-
Virgil Green #3
Re: PHP Command/Code to work out where its being accessed/run from?
"Mark" <mark_news@horsemad.co.uk> wrote in message
news:wK9bd.941$8r6.671@newsfe5-gui.ntli.net...name)> Hi,
>
> Is there a simple way to work out where the code is being run from?
>
> For example, you goto [url]www.mydomain5.co.uk[/url], when the index.php is run, it
> knows you are accessing [url]www.mydomain5.co.uk[/url] and stores the information
> accordingly, so that you could do :-
>
>
> $hostdomain = $_getmydomain (obviously this isnt the correct commandAs stated in the other post, see phpinfo().> echo"Thanks for visiting ".$hostdomain."<br>";
>
>
> for example?
However, you should also remember that you shouldn't do anything to rely to
heavily on this information. It can be spoofed quite easily at most sites.
Simply adding a proper intery in the hosts file in Windows, for instance,
will allow me to access just about any site I want using any domain name I
want. Navigation within that site may or may not continue to use my spoofed
domain name depending upon how the site was constructed.
- Virgil
Virgil Green Guest



Reply With Quote

