|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7971 Unable to open web sites using fope()n command
Submitted: 2000-11-25 15:46 UTC Modified: 2001-08-10 17:01 UTC
From: sksarkar at eos dot ncsu dot edu Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.3pl1 OS: BSD 4.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: sksarkar at eos dot ncsu dot edu
New email:
PHP Version: OS:


 [2000-11-25 15:46 UTC] sksarkar at eos dot ncsu dot edu
**This is the code **
// Headlines Grabber by Neil Moomey,
// You are free to use this code as you wish.
// Make sure you get permission from any web sites you grab code from.
// You may want to write the headlines to a file on your server to speed things up.
// Grab source code from a file or web site
echo "The news interface is down for maintenance.";
// Read each line and add to $myLine
// Extract everything between start and end.  You need to include these lines
//in the headlines or pick some unique  substring in the html to mark the start 
//and end of the news.
$start="<!---START OF HEADLINES--->";
$end="<!---END OF HEADLINES--->";
$start_position=strpos($myLine, $start);
$end_position=strpos($myLine, $end)+strlen($end);
$myLine=substr($myLine, $start_position, $length);
// Display HTML
echo $myLine;

**end of code**

**error message**
Warning: fopen("","r") - Undefined error: 0 in /var/apache/htdocs/news/parse_site4.php on line 8
The news interface is down for maintenance.
**end of error message**


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-16 06:22 UTC]
the fopen wrappers do not currently handle redirects (unless this has been correct) use and it will work.

- James
 [2001-08-10 17:01 UTC]
It currently does, since 4.0.5
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 19:01:28 2024 UTC