SitePoint Sponsor |
|
User Tag List
Results 1 to 14 of 14
Thread: Help for PHP 4.3.2
-
Jul 17, 2003, 04:28 #1
- Join Date
- Jun 2003
- Location
- US
- Posts
- 58
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Help for PHP 4.3.2
I can't get the links with Snoopy.class.ini in the version of PHP 4.3.2, but I can use it on the previous version, I don't know why ?
Can anyone help me ?
The code is listed in below.
Nothing I got in PHP 4.3.2.
Thank You
<?
include "Snoopy.class.inc";
$snoopy = new Snoopy;
$v_url = "http://yahoo.com/";
$snoopy->fetchlinks($v_url);
$link = $snoopy->results;
if (is_array($link)) {
foreach ($link as $value)
{
print "$value\n";
}
}
?>
-
Jul 17, 2003, 08:01 #2
- Join Date
- Oct 2002
- Location
- Scotland
- Posts
- 3,631
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
What does happen? What error messages do you get?
-
Jul 17, 2003, 08:34 #3
- Join Date
- Jun 2003
- Location
- US
- Posts
- 58
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by siteguru
But I can't get what I want in the newer version of PHP.
so what do you think about it?
Normally, it show the links in the script on the older version of PHP.
But now, It can't.
Thank You
-
Jul 17, 2003, 22:04 #4
- Join Date
- Jun 2003
- Location
- US
- Posts
- 58
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by siteguru
-
Jul 17, 2003, 22:35 #5
- Join Date
- Sep 2002
- Location
- The Restaurant at The End of The Universe
- Posts
- 1,423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am also having troubles grabing remote data with some of my scripts after upgrading to 4.32. No errors, even with E_ALL, no data returned, just a blank screen. Worked before, works on my test server which is not 4.32. I have been trying to get help everywhere but only get blank stares.
-
Jul 18, 2003, 17:58 #6
- Join Date
- Jun 2003
- Location
- US
- Posts
- 58
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, I even can't find any error message out when I run the script.
But I can't get the result when I want.
HELP, HELP, HELP
-
Jul 18, 2003, 19:07 #7
- Join Date
- Jun 2003
- Location
- Waterloo, ON
- Posts
- 1,517
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Check with the script writer, perhaps he is relying on pre 4.3.2 code, and maybe he is planning an update.
(Or, better yet, find that code, and submit it back to him as an update -- I'm sure he'd appreciate it!)My name is Steve, and I'm a super-villian.
-
Jul 18, 2003, 19:16 #8
- Join Date
- Jun 2003
- Location
- US
- Posts
- 58
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lieut_data
Did you get any error in the PHP 4.3.2?
Is my code correct?
Did you check it for me?
Thank You
-
Jul 18, 2003, 20:26 #9
- Join Date
- Jun 2003
- Location
- Waterloo, ON
- Posts
- 1,517
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by jacky
If the code worked before 4.3.2, and didn't work after, with no changes made, then it is simply an incompatibility with Snoopy.
I'll try to take a look at Snoopy tomorrowMy name is Steve, and I'm a super-villian.
-
Jul 19, 2003, 07:58 #10
- Join Date
- Sep 2002
- Location
- The Restaurant at The End of The Universe
- Posts
- 1,423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What is Snoopy?
-
Jul 19, 2003, 08:09 #11
- Join Date
- Jun 2003
- Location
- Waterloo, ON
- Posts
- 1,517
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My name is Steve, and I'm a super-villian.
-
Jul 19, 2003, 08:16 #12
- Join Date
- Jun 2003
- Location
- Waterloo, ON
- Posts
- 1,517
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I tested this code on PHP 4.3.2, Apache 2.0.45, WinXP -- no problems.
I'd recheck your installation, possibly remove any php.ini customizations, and try again :-)My name is Steve, and I'm a super-villian.
-
Jul 20, 2003, 16:23 #13
-
Jul 24, 2003, 13:14 #14
- Join Date
- Jun 2001
- Location
- Switzerland
- Posts
- 57
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Edit Snoopy.class.php:
Search for
PHP Code:$results = fread($fp, $this->maxlength);
PHP Code:# this is incompatible with php 4.3.2
# see note at http://www.php.net/fread
# $results = fread($fp, $this->maxlength);
$results = "";
while ( $data = fread($fp, $this->maxlength) ) {
$results .= $data;
if ( strlen($results) > $this->maxlength ) {
break;
}
}
Bookmarks