Menu

Add an Image referencced by URL

PhpRtf
2012-01-05
2013-04-30
  • Horst Kriegers

    Horst Kriegers - 2012-01-05

    I want to load an image that is on another server
    with an address such http://serveur.xyz/folder/image.jpg.

    Is this possible?

    Thanks

     
  • Horst Kriegers

    Horst Kriegers - 2012-01-05

    SOLVED - Reply to myself (this can help for others ;))

    $logoFile = "http://serveur.xyz/folder/image.jpg";
    $fd = fopen( $logoFile, "rb" )
    or die("couldn't open the logo");
    $File = fopen('logo.jpg',"wb");
    while (!feof($fd) ) {
        $contents = fread($fd, 4096);
        fwrite( $File, $contents );
    }
    fclose( $fd );
    fclose( $File );
    

    And after insert the image with phprtf.

     
  • ABID Mohamed Anouar

    Hello,

    Please I need code that allows the insertion of an image in an RTF file.

    cordially
    jockhip12

     
  • Steffen Zeidler

    Steffen Zeidler - 2012-02-18

    Hi jockhip12.

    Do you mean with RTF file an existing file? PHPRtfLite can only create RTF files, not reading RTF files. Therefore I can only explain, how to create the rtf image code that you could try to insert into an existing rtf file by hand. Is it that what you meant?

    Greets,
    SigmaZ

     

Log in to post a comment.