mabby this can help.
<?php
$WebFile =
"http://ksi.plasa.com/ksi-tampil-gambar.php?idpic=9853&status=thumb"; ;
$LocalFile = "xxx.gif";
$handle = fopen ($WebFile, "r"); 
$outhandle=fopen ($LocalFile,"w"); 
while (!feof($handle)) { 
        $buffer=fread($handle,4096); 
        fputs($outhandle,$buffer); 
} 
fclose($handle); 
fclose($outhandle);
?>


--- In [email protected], Pete <[EMAIL PROTECTED]> wrote:
>
> In message <[EMAIL PROTECTED]>, agoes_82 <[EMAIL PROTECTED]>
> writes
> ># file showstream.php
> ><?
> >#binary is your file
> >$binary = "filename.jpg";
> >$buff = fopen ($binary,"r");
> >$buff = fread ($buff,filesize($binary));
> >header ("Content-Type: image/jpeg");
> >header ("Content-Disposition: filename= test.jpg");
> >header ("Content-Transfer-Encoding: binary ");
> >header ("Content-Length : " .$filesize );
> >echo $buff;
> >?>
> >
> >call this from your html
> ><img src='showstream.php'>
> 
> Thanks for the suggestion, but this doesn't work for me.  
> 
> I get
> filesize() [function.filesize]: stat failed
> possibly because the file that I call is an asp file which streams the
> picture to me.
> 
> At the moment, <img src='streaming.asp?id=xxx'> works - I get the
> picture on the site, but I wanted to save the file to the server, to
> speed up on the next call of this image.
> 
> My current program works, using copy(), if the call is to <img
> src='http://xxx/this.jpg'>, but not when the picture is streamed to me.
> 
> 
> 
> 
> 
> >--- In [email protected], Pete <cgrp@> wrote:
> >>
> >> 
> >> I have a requirement to programmatically save some images, which
appear
> >> to be streamed jpgs.  If I make a call to the page which serves these
> >> images, using a browser, then the picture appears, under a different
> >> URL, almost as though the page was forwarded.  The picture
appears fine
> >> if I put a link on a web page.  But the usual copy() command doesn't
> >> work.
> >> 
> >> Any suggestions, people?
> >> 
> >> -- 
> >> Pete Clark
> >> 
> >> Sunny Andalucia
> >> http://www.hotcosta.com/comm_1.htm
> >>
> >
> >
> >
> >
> >
> >Community email addresses:
> >  Post message: [email protected]
> >  Subscribe:    [EMAIL PROTECTED]
> >  Unsubscribe:  [EMAIL PROTECTED]
> >  List owner:   [EMAIL PROTECTED]
> >
> >Shortcut URL to this page:
> >  http://groups.yahoo.com/group/php-list 
> >Yahoo! Groups Links
> >
> >
> >
> >
> 
> -- 
> Pete Clark
> 
> Sunny Andalucia
> http://www.hotcosta.com/comm_1.htm
>





Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-list/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to