Re: Question about comparing Remote image with Local one

From: Anno Siegel (anno4000_at_lublin.zrz.tu-berlin.de)
Date: 10/09/03


Date: 9 Oct 2003 12:00:25 GMT

Vijoy Varghese <viijv@thedifferenZ.com> wrote in comp.lang.perl.misc:
> Hello Group,
>
> My final goal is to show a green/red gif image on my webpage when I am
> available on yahoo chat. Yes for this I could have used the url
> provided by yahoo
> http://opi.yahoo.com/online?u=xxxx&m=g&t=2, where xxxx is my yahoo
> userid. But the images yahoo print wont match with my webpage's
> colors. So I want to display a custom one. Now I know some Perl and I
> decided to give it a try.
>
> I used the LWP module to get the image (either online image/ offline
> image) from yahoo.

[snip irrelevant code]

> Now, I have the image from yahoo through my script. Now what I want is
> to see if the image is that of 'online_status' or 'offline_status'.
> And according to that, display my custom 'online/offline' image.
>
> For this, what I can do is to get the two images from yahoo, when my
> id is offline and when my id is online and save it.
> Then when ever the script is called, compare the real_time image from
> yahoo to the ones saved and take the decision.
>
> Now, my question is, Which is the best way to compare the remote image
> with the one I have on my server?

This sounds like a rather strange plan.

Use MD5 checksums to compare the files, don't compare the whole content.
See Digest::MD5 for how to.

Anno



Relevant Pages

  • Question about comparing Remote image with Local one
    ... available on yahoo chat. ... I used the LWP module to get the image (either online image/ offline ... Now, my question is, Which is the best way to compare the remote image ... Can I embbed the data of the image on my server to the perl program, ...
    (comp.lang.perl.misc)
  • Re: More Problems with ATI Radeon 7200 - (EE) No devices detected.
    ... > Technologies Inc Radeon R100 ... > This layout works for me, compare it to yours, I am ... Do You Yahoo!? ... Mail has the best spam protection around ...
    (Debian-User)
  • Re: Household Bills
    ... Through promises of more good years, ... Do You Yahoo!? ... Mail has the best spam protection around http://mail.yahoo.com ... Not fair to just compare the bill, you pay more if you are using more. ...
    (soc.culture.singapore)
  • Re: JSH: Move over reality TV
    ... > you can run for yourself to count primes at my new Yahoo! ... Then compare the results with those of another method compiled under ... The triumph of popularity over principle. ...
    (sci.math)
  • Re: [SLE] compare dir
    ... I need to compare two dir and delete files in the second dir that ... Do You Yahoo!? ... Mail has the best spam protection around ... Also check the archives at http://lists.suse.com ...
    (SuSE)