php-windows Digest 3 Jul 2002 18:24:12 -0000 Issue 1223

Topics (messages 14548 through 14557):

HTTP_REFERER
        14548 by: R.S. Herhuth
        14556 by: Shrock, Court

Beginner question - blank php page
        14549 by: Arthur
        14550 by: Cassiano Dal Pizzol
        14553 by: Arthur
        14555 by: Shrock, Court

php run server checker not displaying properly
        14551 by: C H

Is it possible to get a hostname?
        14552 by: R.S. Herhuth
        14554 by: Shrock, Court

Re: Php graphics
        14557 by: Peter

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

I have looked at several stats gathering code blocks and they use
$HTTP_REFERER.  When I use that I get and undefined variable error.  I
also tried $HTTP_SERVER_VARS["HTTP_REFERER"] which gets me an undefined
index error.  I also tried $HTTP_SERVER_VARS["REFERER"] which generates
the undefined index error.

What should I be using???


Ron
--- End Message ---
--- Begin Message ---
Two things:

The undefined notice you are getting is the result of your error_reporting
setting in your php.ini...
http://www.php.net/manual/en/function.error-reporting.php

What is ultimately causing the error is that not all HTTP requests to your
page have a referrer defined, therefore, on the occasions that the client
did not specify the referrer, you are getting the undefined notice because
it did not exist.  You can test this my having a page that echoes out the
HTTP_REFERRER variable and also contains a link to itself....I think you
will catch on when you see it in action.

<?php
  echo 'Referrer: '.$_SERVER['HTTP_REFERRER'];
  echo '<br><a href="'. $PHP_SELF .'">Link</a>';
?>

> -----Original Message-----
> From: R.S. Herhuth [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 03, 2002 5:32 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] HTTP_REFERER
> 
> 
> 
> I have looked at several stats gathering code blocks and they 
> use $HTTP_REFERER.  When I use that I get and undefined 
> variable error.  I also tried 
> $HTTP_SERVER_VARS["HTTP_REFERER"] which gets me an undefined 
> index error.  I also tried $HTTP_SERVER_VARS["REFERER"] which 
> generates the undefined index error.
> 
> What should I be using???
> 
> 
> Ron
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Just installed php for the first time. Called up a hello wold page and the
page is blank. Can someone tell me what I'm doing wrong?

TIA Arthur

--
-----------------------------------------------------
Click here for Free Video!!
http://www.gohip.com/free_video/



--- End Message ---
--- Begin Message ---
did u have configured ur server?
ur script works in any other server?

Cassiano Dal Pizzol
Informática CIELO
[EMAIL PROTECTED]
www.cielo.ind.br
UIN 72941129
----- Original Message -----
From: "Arthur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 9:48 AM
Subject: [PHP-WIN] Beginner question - blank php page


> Just installed php for the first time. Called up a hello wold page and the
> page is blank. Can someone tell me what I'm doing wrong?
>
> TIA Arthur
>
> --
> -----------------------------------------------------
> Click here for Free Video!!
> http://www.gohip.com/free_video/
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
My setup:

Win98
Apache 1.3 (docs say v2 not work on win98)
PHP4
File = htdocs/test.php (test.html works fine)
Code:
<html>
<body>
<?php
$myvar = "Hello World1";
echo $myvar;
print ("Hello World 2");
?>
</body>
</html>

--
-----------------------------------------------------
Click here for Free Video!!
http://www.gohip.com/free_video/

"Arthur" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just installed php for the first time. Called up a hello wold page and the
> page is blank. Can someone tell me what I'm doing wrong?
>
> TIA Arthur
>
> --
> -----------------------------------------------------
> Click here for Free Video!!
> http://www.gohip.com/free_video/
>
>
>


--- End Message ---
--- Begin Message ---
What happens when you load a page that only contains the one line:

<?php phpinfo(); ?>

> -----Original Message-----
> From: Arthur [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 03, 2002 5:49 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Beginner question - blank php page
> 
> 
> Just installed php for the first time. Called up a hello wold 
> page and the page is blank. Can someone tell me what I'm doing wrong?
> 
> TIA Arthur
> 
> --
> -----------------------------------------------------
> Click here for Free Video!!
> http://www.gohip.com/free_video/
> 
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
hi all ~

Got a bit of a problem here, I'm writing a page (well, more like modifying 
some code I found ;) ) and the PHP sections appear to be ignored by both 
netscape and IE. I'm not sure if it's something with my code, or a lack of 
PHP exentions on the apache server that it will be placed on.
I'm copying the whole page worth of HTML into this doc (hope it isn't TO 
long.)
Also, for some reason, hotmail doesn't like "< or > or " " tags being copied 
from anyplace else, so I get thousands of "&al; or &gt; or &quot" ... sorry 
...
:-/

Any help would be wonderful! Thanks in advance all!

The code (the original, unedited version):
&lt;?php

error_reporting (E_ALL);

/* Allow the script to hang around waiting for connections. */

set_time_limit (0);

$telnetclient = &quot;zeth&quot;;
$remotehost[0] = &quot;abandonedrealms.net&quot;;
$remoteport[0] = &quot;9000&quot;;
$remotehost[1] = &quot;cnn.com&quot;;
$remoteport[1] = &quot;80&quot;;
$remotehost[2] = &quot;freebsd.org&quot;;
$remoteport[2] = &quot;80&quot;;

$c = count($remotehost);
$c2 = count($remoteport);
if($c != $c2){
    die(&quot;You must have both remoteport and remotehost specified for all 
servers.&quot;);
}

?&gt;

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Zeth's server status checker&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; 
charset=iso-8859-1&quot;&gt;
&lt;/head&gt;

&lt;body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;&gt;
&lt;table width=&quot;100&quot; border=&quot;1&quot; 
cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; 
bordercolor=&quot;#000000&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;table width=&quot;291&quot; border=&quot;0&quot; 
cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
        &lt;tr bgcolor=&quot;#00CCFF&quot;&gt;
          &lt;td&gt;&lt;b&gt;&lt;font color=&quot;#FFFFFF&quot; 
face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; 
size=&quot;2&quot;&gt;Server
            name&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b&gt;&lt;font color=&quot;#FFFFFF&quot; 
face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; 
size=&quot;2&quot;&gt;Status&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;?php
for ($i = 0; $i &lt; $c; $i++) {
$fp = fsockopen(&quot;$remotehost[$i]&quot;, $remoteport[$i], $errno, 
$errstr);

if (!$fp) {
    ?&gt;
       &lt;tr bgcolor=&quot;#FFFFFF&quot;&gt;
          &lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana, 
Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;&lt;?php echo 
$remotehost[$i].&quot;:&quot;.$remoteport[$i]; ?&gt;&lt;/font&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;div align=&quot;center&quot;&gt;&lt;font 
color=&quot;#000000&quot; face=&quot;Verdana, Arial, Helvetica, 
sans-serif&quot; size=&quot;1&quot;&gt;DOWN&lt;/font&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
     &lt;?php
        } else {
     ?&gt;
       &lt;tr bgcolor=&quot;#FFFFFF&quot;&gt;
          &lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana, 
Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;&lt;?php echo 
$remotehost[$i].&quot;:&quot;.$remoteport[$i]; ?&gt;&lt;/font&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;div align=&quot;center&quot;&gt;&lt;font 
color=&quot;#000000&quot; face=&quot;Verdana, Arial, Helvetica, 
sans-serif&quot; size=&quot;1&quot;&gt;UP&lt;/font&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
     &lt;?php
fclose ($fp);
}
}
        ?&gt;
      &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

--- End Message ---
--- Begin Message ---

Is it possible to get the actual hostname of a users host such as AOL or
Mindspring by name?  I tried the get it by using "gethostbyname" using
the "remoteaddr" of the user but all I get is the IP address, not the
host name.

Ron
--- End Message ---
--- Begin Message ---
Try gethostbyaddr()

http://www.php.net/manual/en/function.gethostbyaddr.php

> -----Original Message-----
> From: R.S. Herhuth [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 03, 2002 8:01 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Is it possible to get a hostname?
> 
> 
> 
> Is it possible to get the actual hostname of a users host 
> such as AOL or Mindspring by name?  I tried the get it by 
> using "gethostbyname" using the "remoteaddr" of the user but 
> all I get is the IP address, not the host name.
> 
> Ron
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Sounds like Office has affected your browser and your browser doesn't
recgnise the graphics as a graphic it can open. Either that or the class is
outputting the wrong headers for the image file.
Try:
<HTML><BODY><IMG SRC="jpgraph_lineplot.php"></BODY></HTML>
not sure if this would make any difference though. You could try
reinstalling or upgrading your bowser.




"James Opere" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi all. I have a problem with my graphics which were running well at some
point but now when I try to run the same scripts, I get a dialogue box for
downloading the specified graph. When I say open, the graph is downloaded in
the form of a 'photo editor'. I'm wondering what could have gone wrong. I
installed office XP and from then I got into the trouble especially whenever
I include the class 'jpgraph_lineplot.php'.
Could anybody help with ideas? Without the line plots, things are working
well.
              Opere James.


--- End Message ---

Reply via email to