If the filename is in fact a timestamp then you can find it using a brute
force method.  All you need is a for() loop and fopen().  Start your search
at midnight the previous night and add one second to the timestamp each
itteration.  If the fopen() function returns something other than FALSE then
you know you've found a file.  There are only 86400 seconds in a day..
peanuts.  Probably take PHP two minutes to run through, if that.  You could
put the script on a cron job to have it give you the new filename each
morning.  You may even find that the script building the image file is also
on a timer.. so after a few days you may be able to skip the brute force
method and simply predict what the next filename will be.

Hows that sound?

-Kevin


----- Original Message -----
From: "Merritt, Dave" <[EMAIL PROTECTED]>
To: "'Miguel Cruz'" <[EMAIL PROTECTED]>
Cc: "PHP General (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 2:05 PM
Subject: RE: [PHP] Trying to locate an image file name from another site


> No.  Having any changes made to the corporate server for my ease of use is
> not an option -- too much politics involved (my use of open source
solutions
> in a Microsoft environment!!!).
>
> Dave
>
> -----Original Message-----
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 3:55 PM
> To: Merritt, Dave
> Cc: PHP General (E-mail)
> Subject: Re: [PHP] Trying to locate an image file name from another site
>
>
> On Tue, 9 Jul 2002, Merritt, Dave wrote:
> > I have a page on our intranet site that is pulling an image from our
> > corporate web server.  The corporate server & the image I am accessing
is
> > beyond my control.  The image is generated daily and appears to be named
> > with a timestamp in the file name so therefore the image name changes
> daily.
>
> Can you ask the corporate web site people to insert a distinctive HTML
> comment just before the image? It would just take them a second, have no
> impact on their users, and make your job much easier.
>
> miguel
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to