php question

Discussion in 'OT Technology' started by D1G1T4L, Apr 14, 2007.

  1. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    if you notice for every link at
    http://www.gorillamask.net/
    there is a generated thumbnail which is kind of like a mini screenshot preview of the content of the external link..... how can you do that? i am sure the guy doesnt go to every website he links to and takes a screenshot/resizes it.....
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    i bet it is manual.
     
  3. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area

    i really doubt that for some reason
     
  4. gnp

    gnp New Member

    Joined:
    Mar 11, 2007
    Messages:
    280
    Likes Received:
    0
    well the slick way would work something like this:

    on the hover event fire a async request back to the server with the uri being hovered on.

    upon receiving the request server side code checks to see if the uri's hashed value matches one in a globally kept dictionary list(hashed uri, file location of thumbnail)

    if the hash exists it sends the coorisponding thumb back as a node in the xml response

    if not the code requests the website that is defined by the uri and takes the html returned and feeds it into some sort of component or maybe if kludish into the browser on the server, then uses gdi or whatever the nix equiv is to generate a thumbnail sized bitmap of the page.

    it would then add the hash of the uri to the dictionary and writes the in mem bitmap to file adding the file location as the value to the uri hash key.

    idk thats how i would approach it, i am a little unsure on how they get the bitmap without letting the browser render the html, or using some library that does that for them...it would be a lot of code to implement yourself

    anyone have any other ideas? i am curious as well
     
  5. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    well, you find the solution and report. Until then, I'm 99% certain that site is doing it manually.
     
  6. gnp

    gnp New Member

    Joined:
    Mar 11, 2007
    Messages:
    280
    Likes Received:
    0
  7. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
  8. gnp

    gnp New Member

    Joined:
    Mar 11, 2007
    Messages:
    280
    Likes Received:
    0
    you click the link and read the fucking text on the page...:ugh:
     
  9. dotcompals

    dotcompals New Member

    Joined:
    Apr 10, 2007
    Messages:
    10
    Likes Received:
    0
  10. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    and none of these were employed in the link posted by the OP.
     
  11. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    There was a foum not too long ago that had thumbnails for the links from his site, he was super secretive about it but I'm pretty sure he was using imagemagik's convert and a homebrewed script . . . can't be sure though, I know for a fact it wasn't manual cause the image would display as soon as your post did . . .

    Imagemagik's manpage says it does read html files so . . .
     
  12. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    damn it..... i want to know how he did it.... i want to have a script like that too
     
  13. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
  14. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    try to remember where you saw it! :o
     
  15. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    anyone else?
     
  16. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Those two links I posted are how it's done . . .
     
  17. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area

    yes but i am wondering if there are more ways
     
  18. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    There are ways using .net that you can find if you do a Google search.
     
  19. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
  20. crazybenf

    crazybenf Active Member

    Joined:
    Nov 14, 2001
    Messages:
    15,575
    Likes Received:
    2
    the msnsearch.srv.girafa doesn't pick up a lot of sites. Is it based on alex rating or something?
     
  21. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Hmm good question, forums.offtopic.com doesn't have a preview . . . I know it's not driven off of Google rating cause all of mine have good ratings and one doens't have a preview.
     
  22. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    what do i search for exactly?
     
  23. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    I looked for URL thumbnail . . .
     

Share This Page