foxidea
V2EX  ›  问与答

想问下,这种图片如何加入广告?

  •  
  •   foxidea · Jun 2, 2014 · 4080 views
    This topic created in 4557 days ago, the information mentioned may be changed or developed.
    看了源码,没看出为什么

    http://v1.freep.cn/3tb_140602112519jsx8512293.png
    8 replies  •  2014-06-03 00:49:06 +08:00
    likaci
    likaci
    Jun 2, 2014❤️1
    1
    这个得请 @showlife 指点
    xxr3376
    xxr3376
    Jun 2, 2014
    2
    服务器返回时说明,Content-Type:text/html; charset=utf-8。虽然后缀名是png但是返回的是网页,那么插入广告就非常简单了。
    hellov22ex
    hellov22ex
    Jun 2, 2014
    3
    1楼黑的漂亮
    chenshaoju
    chenshaoju
    Jun 2, 2014
    4
    没那么复杂,楼主按F12就知道了:

    jacy
    jacy
    Jun 2, 2014
    5
    @xxr3376 我这直接显示的是图片啊,没看见广告,奇怪了。Content-Type image/png


    @likaci 不能怪人家,这免费图床不是人家的。
    ctsed
    ctsed
    Jun 2, 2014
    6
    跟referrer有关系
    vmebeh
    vmebeh
    Jun 2, 2014
    7
    楼上+1,Referer 非空就返回图片。
    zeinimei
    zeinimei
    Jun 3, 2014
    8
    为毛我看不到广告?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4590 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 03:42 · PVG 11:42 · LAX 19:42 · JFK 22:42
    ♥ Do have faith in what you're doing.