SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Hybrid View

  1. #1
    SitePoint Enthusiast
    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";

    }

    }



    ?>

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What does happen? What error messages do you get?
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    US
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru
    What does happen? What error messages do you get?
    Actually, I didn't get any error message.
    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

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    US
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru
    What does happen? What error messages do you get?
    Can anyone has a problem with version 4.3.2 of PHP??

  5. #5
    Now with customized title Jump's Avatar
    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.

  6. #6
    SitePoint Enthusiast
    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

  7. #7
    La la la la la bronze trophy lieut_data's Avatar
    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.

  8. #8
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    US
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lieut_data
    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!)
    I don't know about it. I contacted the writer already.

    Did you get any error in the PHP 4.3.2?

    Is my code correct?

    Did you check it for me?

    Thank You

  9. #9
    La la la la la bronze trophy lieut_data's Avatar
    Join Date
    Jun 2003
    Location
    Waterloo, ON
    Posts
    1,517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jacky
    I don't know about it. I contacted the writer already.

    Did you get any error in the PHP 4.3.2?

    Is my code correct?

    Did you check it for me?

    Thank You
    No, Maybe, Seems to be

    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 tomorrow
    My name is Steve, and I'm a super-villian.

  10. #10
    Now with customized title Jump's Avatar
    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?

  11. #11
    La la la la la bronze trophy lieut_data's Avatar
    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.

  12. #12
    La la la la la bronze trophy lieut_data's Avatar
    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.

  13. #13
    Now with customized title Jump's Avatar
    Join Date
    Sep 2002
    Location
    The Restaurant at The End of The Universe
    Posts
    1,423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  14. #14
    SitePoint Enthusiast UCAP's Avatar
    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); 
    and replace that line with the following:

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •