Re: [PHP-DB] The noobest of questions...

2002-12-10 Thread DL Neil
Hi Brett,
[please keep conversations on the list - someone else might have helped you
more promptly - others might benefit from following the conversation]

 This is how I have the code written:
   if ($num_results  0){
 fopen(http://www.vcathletics.org/Misc/AdminMenu.htm,r;);
   }
 If I go to that link directly, it works.  But command above just loads a
 blank page into the frame.  I know its working, because if $num_results is
 not  0, I get the error echo.


Firstly, do you prove the contents of $num_results to be sure that the
then-clause is actioned?

Secondly fopen returns a value which is resource for use in later f*()
function calls - or which indicates that the open failed for some reason.
Please refer to: http://uk2.php.net/manual/en/function.fopen.php

fopen() only opens the file, or in this case web page. It is thereafter
necessary to read the file (several functions available) - and to fclose()
it later...

You talk about loads a blank page into the frame. Do you want to read the
contents of the web page with a view to further processing (my example: read
the page and locate any links - to verify 'continuity'), or do you want to
'read' the page to present it within your output, eg one frame within a
frameset (in which case fopen() etc is probably not the best route)?

Regards,
=dn


 Brett,
 Works for me!
 Show your code,
 =dn


  How do you load a standard web page from PHP.
 
  I thought, from what I read, that is was with fopen() ... but its not
  working for me.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] The noobest of questions...

2002-12-08 Thread Brett Lathrope

How do you load a standard web page from PHP.

I thought, from what I read, that is was with fopen() ... but its not
working for me.

Thanks


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] The noobest of questions...

2002-12-08 Thread DL Neil
Brett,
Works for me!
Show your code,
=dn

 
 How do you load a standard web page from PHP.
 
 I thought, from what I read, that is was with fopen() ... but its not
 working for me.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] The noobest of questions...

2002-12-08 Thread John W. Holmes
 How do you load a standard web page from PHP.
 
 I thought, from what I read, that is was with fopen() ... but its not
 working for me.

You can do it with fopen(). If it's not working, make sure there are no
redirects, as fopen() (until PHP 4.3) will not follow them. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php