1 Reply Latest reply on Sep 13, 2006 8:16 PM by Newsgroup_User

    preloadnetthing with php generated image

      I've got a simple director file which loads an external image and displays it on the stage. However when I switch the image.jpg filename for an image.php file name (the php script dynamically builds a jpg image, and displays it with correct headers) the movie can't load the file. I've not been able to find anything about using a php generated image for prelaodnetthing so I don't know if this is a limitation or if there is something different I need to do. Any ideas? this is an urgent issue for me.
        • 1. Re: preloadnetthing with php generated image
          Level 7
          Here's a response from the Direct-L archives on the same or a similar
          hi william,

          I think either setting the filename or using preloadNetThing should work
          with URLs that contain GET parameters, as long the server sends the
          correct MIME type (as arthur has already stated). You would have to test
          the maximum URL length supported by director, I would guess it's at
          least 500 or 1000 chars.

          if you have to pass more information to the backend, a work-around would
          be to split the process in 2 steps:
          - send data from director to PHP with postNetText
          - PHP script generates a temporary image file with a random filename
          (e.g. $img_filename = md5(uniqid(rand())) . '.jpg') and returns the
          filename (URL) of the image to director
          - director now loads that image


          The thread was titled "Getting a server image returned by a php script"
          nad started around Tue, 15 Nov 2005 - you could subscribe to Direct-L
          and read the archives: < http://listserv.uark.edu/archives/direct-l.html>