Re: include statement errors -- something missing

From: Date: Mon, 17 Jun 2002 22:49:21 +0000
Subject: Re: include statement errors -- something missing
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-102619@lists.php.net to get a copy of this message
Yes, you will. You've only opened the file, you need to read it, and process it and extract the data that you want. i.e.. $blah = fopen(http://a/a.html, "r"); while ($blah) { do something with it } and so forth.... Try php.net / google.com there's lost of examples of sites and pages using fopen to include data from other web sites... Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 ----- Original Message ----- From: "Doug DeVries" <m.devries@attbi.com> To: "Chris Knipe" <savage@savage.za.org>; "Doug DeVries" <info@spstechhelp.com>; "Php-General (E-mail)" <php-general@lists.php.net> Sent: Tuesday, June 18, 2002 12:32 AM Subject: Re: [PHP] include statement errors -- something missing > Thank you, but it is not quite working yet. I get no errors, but rather > blank. > > http://www.solomonsporch.org/test.php > > ----- Original Message ----- > From: "Chris Knipe" <savage@savage.za.org> > To: "Doug DeVries" <info@spstechhelp.com>; "Php-General (E-mail)" > <php-general@lists.php.net> > Sent: Monday, June 17, 2002 12:55 PM > Subject: Re: [PHP] include statement errors -- something missing > > > > RTFM.... > > > > http://www.php.net/manual/en/function.fopen.php > > > > > fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4 > > ", "r"); > > > > Would give read-only access to the file, which is what you want. > > > > > > ----- Original Message ----- > > From: "Doug DeVries" <m.devries@attbi.com> > > To: "Chris Knipe" <savage@savage.za.org>; "Doug DeVries" > > <info@spstechhelp.com>; "Php-General (E-mail)" <php-general@lists.php.net> > > Sent: Monday, June 17, 2002 9:36 PM > > Subject: Re: [PHP] include statement errors -- something missing > > > > > > > I tried fopen in the following way, but with no success. > > > > > > <?php > > > > > > fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4 > > > "); > > > ?> > > > > > > > > > ----- Original Message ----- > > > From: "Chris Knipe" <savage@savage.za.org> > > > To: "Doug DeVries" <info@spstechhelp.com>; "Php-General > > > (E-mail)" > > > <php-general@lists.php.net> > > > Sent: Monday, June 17, 2002 12:33 PM > > > Subject: Re: [PHP] include statement errors -- something missing > > > > > > > > > > I don't think you can use include like that.... > > > > > > > > Have a look at fopen though, I'm not 100% sure that is going to help, > > but > > > I > > > > know fopen opens files on remote sites, include only does local. > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Doug DeVries" <m.devries@attbi.com> > > > > To: "Php-General (E-mail)" <php-general@lists.php.net> > > > > Sent: Monday, June 17, 2002 9:27 PM > > > > Subject: [PHP] include statement errors -- something missing > > > > > > > > > > > > > Help ... please. ... > > > > > > > > > > From the page www.solomonsporch.org/test.php I get the following > > error. > > > > > > > > > > Warning: Failed opening > > > > > 'http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit > > =4' > > > > for > > > > > inclusion (include_path='c:\php4\pear') in > > e:\solomonsporch.org\test.php > > > > on > > > > > line 10 > > > > > > > > > > The page HTML is as follows: > > > > > > > > > > <html> > > > > > <head> > > > > > </head> > > > > > <body> > > > > > test area should show 4 lines of news > > > > > > > > > > > > > > > <?php > > > > > > > > > > > > > > > include("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit > > > > > =4"); > > > > > ?> > > > > > > > > > > > > > > > </body> > > > > > > > > > > </html> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, visit: > > > > > http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: > > > > http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > >

« previous php.general (#102619) next »