#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Soignies, HT, Belgium
    Posts
    4
    Rep Power
    0
    SUBJECT: Managing my banners

    Hello,

    I'm webmaster of a site which will open next month. I've prepared a lot of banners and want to control who display one of my banner on his site.

    Clearly said, the other webmaster inserts <IMG SRC='http://www.delcampe.com/banner.php?member=145'> in his HTML code and my page 'banner.php' returns an image found randomly in my MySQL database and register which member has displayed this banner (in order to make stats).

    It is really important for me. Can you help me?

    1000x thanks

    Sebastien
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Niteroi, RJ, Brazil
    Posts
    30
    Rep Power
    15
    I'm not sure about this, but you'll have to set the encoding header to image/gif or something like that, dunno exactly what header is, and then read each line from your image and start printing all over the file. It cannot contain HTML tags...

    Basically, I think that's it... Anyone that knows exactly what I am talking about could explain better.

    But you can try another thing too...

    Dunno if works, but your php can redirect to a file so it probably displays correct... dunno, I still think the other solution is better (I mean, works)

    ------------------
    Eduardo Teixeira Cardoso
    PHP Programmer from Brazil
    idnotfound@vircio.com.br
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Niteroi, RJ, Brazil
    Posts
    30
    Rep Power
    15
    GOT WHAT YOU NEEEED!!!!

    the code follows:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <?php

    header("Content-type: image/gif");

    $arq = "http://wwp.icq.com/scripts/online.dll?icq=5567539&img=5";
    $fp = fopen($arq,"r");
    while (!feof($fp)) {
    $buf = fread($fp, 1024);
    print ($buf);
    }

    ?>
    [/code]

    I tested and worked. My page just contain this. Try in your page...

    ------------------
    Eduardo Teixeira Cardoso
    PHP Programmer from Brazil
    idnotfound@vircio.com.br
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Ribeirao Preto, SP, Brasil
    Posts
    5
    Rep Power
    0
    Well.....
    eu ia posta essa resposta!! hahaha....e por falar nisso...vc usou no seu site tb eh?!!? hum...sabia q se ia gosta da ideia!!!!
    ah, eu copiei parte do coment do seu user tb viu!!?!? hehehe.....t+ ID

    tks for all!
    []'s


    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by IdNotFound:
    GOT WHAT YOU NEEEED!!!!

    the code follows:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <?php

    header("Content-type: image/gif");

    $arq = "http://wwp.icq.com/scripts/online.dll?icq=5567539&img=5";
    $fp = fopen($arq,"r");
    while (!feof($fp)) {
    $buf = fread($fp, 1024);
    print ($buf);
    }

    ?>
    [/code]

    I tested and worked. My page just contain this. Try in your page...

    [/quote]



    ------------------
    Jonis Maurin
    I'm programming from brazil!
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Niteroi, RJ, Brazil
    Posts
    30
    Rep Power
    15
    Jonis, por favor faz um esforco e fala em ingles, blz?

    Jonis, can you please speak in English so can everyone understand? Thanks!

    He said above:

    Thanks for your help ID! (He had the same problem)

    He said he copied my signature too...

    Sorry fellows! Good luck with your code, sdelcampe!

    ------------------
    Eduardo Teixeira Cardoso
    PHP Programmer from Brazil
    idnotfound@vircio.com.br

Similar Threads

  1. PHP mail() and Subject:, From: headers
    By gjenkin in forum PHP Development
    Replies: 13
    Last Post: August 17th, 2003, 11:37 PM
  2. ' doesn't displays in subject but " does
    By DUBB GaineR in forum PHP Development
    Replies: 2
    Last Post: July 18th, 2003, 02:43 PM
  3. Replies: 20
    Last Post: January 2nd, 2002, 02:29 AM
  4. Any way of making my banners load last?
    By dodgie in forum HTML Programming
    Replies: 2
    Last Post: September 28th, 2001, 02:40 PM

IMN logo majestic logo threadwatch logo seochat tools logo