Menu

New release: v0.8.5

Help
Izzy
2007-01-22
2013-04-25
  • Izzy

    Izzy - 2007-01-22

    Okay fellas,

    I announced it, you approved - so I did it. Changed the structs of the files a little bit, so "backporting" changes from phpVideoPro to the PHPIMDB project will be a bit more easy. Maybe I introduced some little probs with this, since I didn't test it to deep (enough to test with the phpVideoPro ;) - so as you did until now, simply post all problems here. I monitor the forum and try to help the best I can (so if necessary, we package a new release now a bit faster). Feedback welcome.

    All the best,
    Izzy.

     
    • wtf72

      wtf72 - 2007-01-25

      Photo is still not working , also Plot is not showing for every movie, it's rare but sometimes Plot is empty.

       
      • Izzy

        Izzy - 2007-01-26

        I just made a simple test before I released the code - and all information (including the little photo which is usually from the cover of the DVD) was retrieved OK. Which does not necessarily mean there are no movies where it might not work - for unknown reasons, some movies are rendered differently. Same for the plot - and as you write, it's rare but sometimes happens. Here it would be helpful if you could mention one/some movies you're having trouble with, so I might investigate. And maybe try with "Armageddon" (the one with Bruce Willis), since that one was working here at release time (and still is, just tried that one plus another one to make sure there were not again code changes at the IMDB site).

         
    • wtf72

      wtf72 - 2007-01-26

      Too bad about photo but I've tried everything and no success with every movie. Maybe it's working only when you are opening with http://hosturl/imdb/ and when you type the name of the movie there, but it's not the same inside another application when you just parse the imdb link (not the movie name, direct link to the movie instead) , well It's ok overall for me even with photo problem and plot for some movies, there were maybe 4 movies so far that didn't return any info at all, you can try Death Wish (1974) http://www.imdb.com/title/tt0071402/ and also Death Wish II (1982) http://www.imdb.com/title/tt0082250/ , I dont remember other 2 movies, again I must say that is working within http://hosturl/imdb/ where you enter not imdb link but movie name, but if you want to use this code in other way (direct imdb link) those movies are not working.

       
      • Izzy

        Izzy - 2007-01-26

        Not sure what you mean by "direct imdb link" parsing. But I can assure you it is working from other applications, too - see phpVideoPro, that's where I maintain the code right now. I guess you maybe using the wrong functions for that? How are you doing a "direct imdb link" parse? If you could describe this a bit more in detail it maybe helpful to find out what is going wrong.

         
    • wtf72

      wtf72 - 2007-01-26

      OK, the user is required to enter not movie title but already known imdb link for that movie, that's what "direct imdb link" was , but now I've tested this on my machine running Apache Web server and everything is working fine, trouble is with my hosting server running IIS , so I guess that's the problem because everything else is the same. Tnx and sorry for the false alarm :)

       
    • wtf72

      wtf72 - 2007-01-26

      And maybe the problem is that server is not using PEARs HTTP_Request class , because I'm getting error on line 131 in imdb_config.php - $page .= fread ($this->fpopened, 1024);
      error is Undefinied variable $page

       
      • Izzy

        Izzy - 2007-01-27

        Hm, that is strange - since I never used the PEAR classes with my application. That error may be caused by incorrect splitting/merging on the backport, I need to investigate that a bit closer (but have a raw idea where to look now). If I find something, I will post it here. Thanx again for your feedback!

        P.S.: Very strange is that you report an error on line 131 of the imdb_config.php - since that file only has 123 lines in the distribution. Could you check again if you really updated all the files in your installation? Although I wrote something about "putting everything to one file", I still left the configuration in a separate file which also may require to be updated in your installation...

         
    • wtf72

      wtf72 - 2007-01-27

      I will try to explain in every detail what is going on.
      I've downloaded this new release and extracted in imdb folder on my computer running Apache2, then I type http://someurl/imdb/ and enter movie name , then click on movie name and everything is OK , photo is there and everything else is working fine.
      Now, I'm not hosting anything on my machine and that was only for testing purposes, when I do exactly the same thing with site which I administer and hosting server is running on IIS instead Apache, then when I type http://someurl/imdb/ and type the same movie as on my machine everything is the same except this : Notice: Undefined variable: page in C:\inetpub\www\someurl\imdb\imdb_config.php on line 101 , but movie list with movie name variations is displayed as it should be, so... everything is ok except that Notice, and finally when I click on the movie name there is photo displayed and everything else is fine but there are four Notice errors about undefined variable: page , you were right about error line, sorry for that, so it's line 101, anyway error is about undefined variable page .
      And that's it, btw for PEAR classes I've read in README file, it says : To install it:
      - this versions requires PEARs HTTP_Request class (see pear.php.net)
      so I thought maybe that's the problem (maybe it's not , I dont know becasuse I have to ask my hosting server about that but I've checked with you first) .
      I hope you can now tell me more about this problem and hopefully find a fix.
      Tnx.

       
      • Izzy

        Izzy - 2007-01-28

        Okay, I checked that. As for the undefined variable: It's just a notice (not an error/warning). To avoid this, two possibilities:
        1) go to that line 101. In line 100 is a "while" statement. Before that, insert a line saying "$page = '';"
        2) tell PHP to not talk about notices (for details, see the PHP manual on error_reporting)
        I meanwhile fixed the code with the first variant.

        Concerning the PEAR classes: Sometimes in the past, Giorgos decided to drop the browseremu and use PEAR instead, so he wrote that in the README. One version later he decided to support the browser emu class again, but obviously forgot about that note in the README. I fixed that also to keep away people from confusion: It now states that you either need PEAR or the included browser emu class.

        If you applied solution 1 - please let us know whether or not the problems with IIS have been gone.

         
    • wtf72

      wtf72 - 2007-01-28

      Solution 1 worked perfectly and now everything is fine.
      The only thing for you to check is maybe that Plot field, there is a large number of movies where Plot is not displayed, I've used for my application other solution just for the Plot field and is working fine.

       
      • Izzy

        Izzy - 2007-01-28

        Good to read that everything now is working fine. Concerning the plot, I would like to hear more about the "other solution" mentioned - maybe it's something we could apply to our code here?

         
    • wtf72

      wtf72 - 2007-01-28

      Sure, here is the link : http://ak-47.at/code/imdb_parser/

       
      • Izzy

        Izzy - 2007-01-28

        Thanx for the link! I did a short browse on that. Nice code - much easier to understand than the one of our class here ;) But still, it has some disadvantages: First, it is for sure fixed to the English pages (hm, our code in most cases as well). But second, you will for sure only get the first plot, since you stop at the first HREF (which is in many cases the email address of the person writing the plot). And third, if somebody puts something in double quotes (e.g.: 'Have you seen the "funny" character?'), it will not be recognized as a plot (as far as I understand it from your code - I did not try it).

        Can you provide an example where our class here does not recognize the plot, but yours does? Then I could check it out and take the best of both variants to merge it into the class.

         
    • wtf72

      wtf72 - 2007-01-28

      Yeah, simple code but not as good as yours ;)
      Anyway, trust me , there were a number of movies where Plot is not shown, in all that cases this code from parser worked, for sure you can check on this one "Alien autopsy" , imdb for that one is http://us.imdb.com/title/tt0466664/ , I cant really now remember and try some others but you can check that one for sure, I've tried minute ago.

      I'm gonna try to fetch user comments too, it's working for now but not for all , I guess that's because random user comments but that's another thing, screenshots would be great too :)

       
      • Izzy

        Izzy - 2007-01-29

        Ah, now I see what you mean. That movie has no plot summary page at all. And since we retrieve the plot summary from there, in this case we've got nothing to retrieve. Your script instead focusses on the short plot outline instead, so you get those two lines back. Hm, not a bad idea - I could fall-back to that if no plot summary is found, or add that outline anyway (as first item, since it's the short abstract). Which variant you think would be the better?

         
    • wtf72

      wtf72 - 2007-01-29

      Well, maybe you can add that outline anyway, as first item as you say (it's short so why not). That way some movies which dont have Plot summary would not be empty.

      Maybe retreiving screenshots from photo gallery would be nice feature, I'm gonna work on that now, btw if you are interested in retreiving User Comments (one random comment) please let me know and I can tell you how, but I'm using one other class for that (Snoopy class(http://snoopy.sourceforge.net/)

       
      • Izzy

        Izzy - 2007-01-29

        Plot Outline: Sure, is in my plans.
        ScreenShots: Well, nice idea - but sometimes they are too many. And I don't like randoms there ;)
        User Comments: Hm, not sure...

        I primarily think of features which can be of use for phpVideoPro, my main application. That was how I originally came to this project. So to tell the truth: Maintenance of PHPIMDB is somehow a side-effect to my work on phpVideoPro - since I need the code there, I need working code here. And Giorgos is not working on the project currently; so I will maintain the project until he returns. So the good thing is, it is still be maintained - the other side of the medal is, that features I won't use in phpVideoPro I will probably not work on, if it requires more time...

        But I'm always open to suggestions. Sometimes the ideas come from surprising sources, and one thing drives the other. So as you mentioned the ScreenShots, I thought "Hm, might be a nice idea if it comes to cover generation in PVP" - e voila, new idea for PVP ;) Same for the plot outline - better one brief comment than none, right?

         
    • wtf72

      wtf72 - 2007-01-30

      Well...I've finally find some time and browse trough this code and I can tell you that I've switched to this class for my application, and I've implemented in imdb.class.php 3 new functions, for plot outline, one random comment from the bottom of imdb page and user choice of how many user comments from /usercomments page , it's working fine, if I find some time I'll check screenshots function and give you the link to download that new imdb.class.php
      It's your choice will you call(use) the new functions or not ;)
      btw in your sample page you are using language function and you already have languages functions, I've found that first language on some movies on IMDB is not the right choice so all languages displayed can be useful, it's no biggy but you can fix that for the next release as well.

       

Log in to post a comment.

MongoDB Logo MongoDB