V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
foxidea
V2EX  ›  问与答

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

  •  
  •   foxidea · Jun 2, 2014 · 3653 views
    This topic created in 4353 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
        1
    likaci  
       Jun 2, 2014   ❤️ 1
    这个得请 @showlife 指点
    xxr3376
        2
    xxr3376  
       Jun 2, 2014
    服务器返回时说明,Content-Type:text/html; charset=utf-8。虽然后缀名是png但是返回的是网页,那么插入广告就非常简单了。
    hellov22ex
        3
    hellov22ex  
       Jun 2, 2014
    1楼黑的漂亮
    chenshaoju
        4
    chenshaoju  
       Jun 2, 2014
    没那么复杂,楼主按F12就知道了:

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


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