nginx配置

Continue Read..

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

upstream business {
        server 10.6.6.202:80;
    }
    server {
        listen       8002;
        server_name  localhost;
location /ZHHTBoss/s1 {
proxy_pass http://business;
}
location / {
root G:\\ZHHT_BOSS\\trunk\\Boss;
index index.html index.htm;
}

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

【html】扣今日头条顶部样式

Continue Read..

点击查看原图

 

 

 

 

<style>

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, a, code, em, img, q, small, strong, dd, dl, dt, li, ol, ul, fieldset, form, label, table, tbody, tr, th, td, input {

    margin: 0;

    padding: 0;

    border: 0;

}

#mohAhv.mohAhv-KmHmFr {

    display: block;

}

 

#mohAhv.mohAhv-KmHmFr{position:fixed;top:0;width:100%;height:50px;z-index:1400;background:rgba(0,0,0,.7);background-repeat:no-repeat;background-position:center bottom;background-size:100% 100%;color:#fff}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr{height:100px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr{height:150px}#mohAhv.mohAhv-KmHmFr .open,#mohAhv.mohAhv-KmHmFr .logo,#mohAhv.mohAhv-KmHmFr .close,#mohAhv.mohAhv-KmHmFr .banner-label{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}#mohAhv.mohAhv-KmHmFr .logo{height:30px;width:30px;left:15px;background:url(http://chexiaopang.qiniudn.com/144965254166.jpg) no-repeat;overflow:hidden;background-size:30px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo{height:60px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo{height:90px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo{width:60px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo{width:90px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo{left:30px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo{left:45px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo{background-size:60px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo{background-size:90px}#mohAhv.mohAhv-KmHmFr .logo .mask{height:20px;background:rgba(255,255,255,.6);width:0;margin-top:10px;margin-left:10px;-webkit-animation-delay:3s;-webkit-box-shadow:0 0 20px 4px #fff;-webkit-transform:rotate(15deg);-webkit-animation:ani-mask 1s;-webkit-animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo .mask{height:40px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo .mask{height:60px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo .mask{margin-top:20px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo .mask{margin-top:30px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .logo .mask{margin-left:20px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .logo .mask{margin-left:30px}#mohAhv.mohAhv-KmHmFr .banner-label{left:50px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .banner-label{left:100px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .banner-label{left:150px}#mohAhv.mohAhv-KmHmFr .banner-label p{color:#fff;font-size:12px;line-height:15px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .banner-label p{font-size:24px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .banner-label p{font-size:36px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .banner-label p{line-height:30px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .banner-label p{line-height:45px}#mohAhv.mohAhv-KmHmFr .banner-label .tb{font-size:15px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .banner-label .tb{font-size:30px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .banner-label .tb{font-size:45px}#mohAhv.mohAhv-KmHmFr .close{height:40px;width:20px;padding:5px;position:absolute;right:0;background:url(http://s2.pstatp.com/resource/growth_fe/toutiao_wap/static/image/banner_ic_close_d13c775.png) no-repeat center center;background-size:14px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .close{height:80px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .close{height:120px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .close{width:40px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .close{width:60px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .close{padding:10px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .close{padding:15px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .close{background-size:28px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .close{background-size:42px}#mohAhv.mohAhv-KmHmFr .open{right:40px;background:#ff424b;display:inline-block;width:60px;font-size:13px;line-height:30px;color:#fff;border-radius:6px;text-align:center}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .open{right:80px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .open{right:120px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .open{width:120px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .open{width:180px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .open{font-size:26px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .open{font-size:39px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .open{line-height:60px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .open{line-height:90px}#mohAhv.mohAhv-KmHmFr .has_top_banner{padding-top:50px}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .has_top_banner{padding-top:100px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .has_top_banner{padding-top:150px}#mohAhv.mohAhv-KmHmFr .has_top_banner .mohAhv-KmHmFr{display:block!important}#mohAhv.mohAhv-KmHmFr .app_download_tip{display:none;position:fixed;top:0;left:0;bottom:0;background:#fff;right:0;z-index:1000}#mohAhv.mohAhv-KmHmFr .app_download_tip img{display:block;margin:0 auto;width:270px;max-width:100%}[data-dpr="2"] #mohAhv.mohAhv-KmHmFr .app_download_tip img{width:540px}[data-dpr="3"] #mohAhv.mohAhv-KmHmFr .app_download_tip img{width:810px}#mohAhv.mohAhv-KmHmFr .has_app_download_tip .app_download_tip{display:block}

</style>

<script lang="JavaScript">

$("#mohAhv").hide();

</script>

<div id="mohAhv" class="mohAhv-KmHmFr">

<a href="javascript:void(0)" class="close"></a><a href="http://m.chexiaopang.com" target="_self" class="download vwo-top-banner" ga_category="top_banner" ga_label="" ga_event="click" rel="nofollow" data-position="top"><div class="logo"><div class="mask"></div></div><div class="banner-label"><p class="tb">车小胖</p><p>最大的二手车批发平台</p></div><div class="open">

立即打开

</div></a></div>

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

网站统计和APP统计

Continue Read..
爱泊车APP:

APP安卓版:
Android 唯一Appkey为:56eb5fd867e58e8a47000a25

iPhone版:
iPhone 唯一Appkey为:56eb61dae0f55a20d00031c6

SDK在附件中。


aipark.com网站统计:


百度统计
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?f8d4094c101144bcd792bc72a562b705";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


Google analytics统计:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-75269856-1', 'auto');
  ga('send', 'pageview');

</script>


智慧互通网站统计:

Google analytics统计:
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-75269856-2', 'auto');
  ga('send', 'pageview');

</script>

百度统计:
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?e3d705f7b4189497bb8610acf0408b69";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

【PHP】curl模拟赶集登陆并发帖

Continue Read..

研究了快一个月,终于搞定了

公司要同步数据,在我们的系统上发车的同时,同步到赶集二手车上面

 赶集很蛋疼 ,php登陆的时候可以获取到返回cookie  但是这个cookie只判断了 当前时候登陆

发帖的时候 他拿着登陆cookie等(我也不晓得他怎么弄的)  用一堆js生成了一个新的cookie 

每次发帖 他就拿新的cookie请求

 

中途乱测试  赶集的工作人员还给我打电话! 

 

php端 curl只能获取到返回cookie  没办法 同事做了个java的登陆 直接模拟浏览器 把他新生成的cookie 扣下来了 

然后我放redis里面 长期调用  

 

发个简化版的    完整版的 直接找我吧  

<?php

//tongxing

// echo urlencode($cookie_text);die;

require_once 'curl/curl.php';

$curl = new Curl;

 

 

 

$curl->headers['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';

$curl->headers['Accept-Language'] = 'zh-CN';

$curl->headers['Cache-Control'] = 'max-age=0';

$curl->headers['Connection'] = 'keep-alive';

$curl->headers['Cookie'] = 'GANJISESSID=70c7054233114d5311cd4cf059c35c3a310;sscode=EhmWKE9iO2PqyX3w11EhT1UOaA;GanjiUserName=%2523m_639695456;GanjiUserInfo=%257B%2522user_id%2522%253A639695456%252C%2522email%2522%253A%2522%2522%252C%2522username%2522%253A%2522%2523m_639695456%2522%252C%2522user_name%2522%253A%2522%2523m_639695456%2522%252C%2522nickname%2522%253A%2522%2522%257D;bizs=%255B%255D;supercookie=AwZ5Awx1AQH2WQAvATHjLJEvZwEuAQIvAmH5BJZ4ZmEyZGV1MGRkZ2LkZzEuAQp3ZTD%253D;sscode=EhmWKE9iO2PqyX3wEhT1UOaA;GanjiUserName=%2523m_639695456;GanjiUserInfo=%257B%2522user_id%2522%253A639695456%252C%2522user_name%2522%253A%2522%2523m_639695456%2522%252C%2522email%2522%253A%2522%2522%252C%2522cityid%2522%253A0%252C%2522district%2522%253A0%252C%2522gender%2522%253A0%252C%2522phone%2522%253A15594879177%252C%2522nickname%2522%253A%2522%2522%252C%2522password%2522%253A%2522%2522%252C%2522real_name%2522%253A%2522%2522%252C%2522source%2522%253A206%252C%2522email_auth_time%2522%253A0%252C%2522phone_auth_time%2522%253A1457085940%252C%2522username%2522%253A%2522%2523m_639695456%2522%252C%2522avatar%2522%253A%2522%2522%252C%2522status%2522%253A0%252C%2522check_status%2522%253A0%257D;citydomain=hz;__utmt=1;__utma=32156897.1052870469.1457517651.1457517651.1457517651.1;__utmb=32156897.1.10.1457517651;__utmc=32156897;__utmz=32156897.1457517651.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29;ganji_xuuid=3c86cd60-7891-49c9-d7fc-f166429c26af.145711517654276;ganji_uuid=8511110175551607788358536;_gl_tracker=%257B%2522ca_source%2522%253A%2522-%2522%252C%2522ca_name%2522%253A%2522-%2522%252C%2522ca_kw%2522%253A%2522-%2522%252C%2522ca_id%2522%253A%2522-%2522%252C%2522ca_s%2522%253A%2522self%2522%252C%2522ca_n%25122%253A%2522-%2522%252C%2522ca_i%2522%253A%2522-%2522%252C%2522sid%2522%253A64860286966%257D;';

$curl->headers['Host'] = 'www.ganji.com';

$curl->headers['Referer'] = 'http://www.ganji.com/pub/pub.php?act=pub&method=load&cid=6&mcid=14&domain=bj&deal=1&_pdt=che';

$curl->headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.8.1000 Chrome/30.0.1599.101 Safari/537.36';

 

$url = 'http://www.ganji.com/pub/pub.php?act=pub&method=submit&cid=6&mcid=14&domain=bj&h=2';

$data = 'ID=0&adID=0&combo=1&fpic=%2Fwutu_small.gif&validdays=30&vctypebelong=1&make=SAIC&family=QQ3&year=201200&file=CHER12EN&rank=7&pics=%2Ftmp%2Fpic820160303212900-PyCoZ.jpeg&provinceID=BJ&zoneID=1&sellBrand=%C6%E6%C8%F0&simpleFamily=QQ3&files=0.8L+%CA%D6%B6%AF+%CA%EE%C6%DA%CF%DE%C1%BF%B0%E6&reg_year=2012&reg_month=1&distance=1&price=1.7&description=1111&color=1&innerColor=0&contactman=%B2%E2%CA%D4&telephone=13617291145&connectTime=0&provinceID1=BJ&zoneID1=1&countyID1=&viewAddr=&roadtoll_year=-1&mot_year=-1&insurance_year=-1&surtax=-1&driving_license=-1&invoice=-1&repair_recorder=-1&usage=0&transfer=-1&vin=';

 

 

$tj["major_category_id"] = 14;

$tj["auto_type"] = 0;

$tj["autotype"] = 0;

$tj["beforeAudit"] = "";

$tj["show_before_audit"] = "";

$tj["show_before_audit_reason"] = "";

$tj["origin"] = "";

$tj["text"] = "奇瑞11111111 QQ 2013款  启航ⅠⅠ版";

$tj["car_id"] = 28752;

$tj["tag_text"] = "";

$tj["tag_url"] = "";

$tj["year_style"] = "年款";

$tj["defined_car"] = "车型";

$tj["air_displacement"] = "排量";

$tj["engine"] = "";

$tj["gearbox"] = "";

$tj["license_date"] = "2011";

$tj["license_math"] = 1;

$tj["road_haul"] = 3;

$tj["accidents"] = 1;

$tj["car_color"] = 6;

$tj["price"] = 10;

$tj["transfer_fee[]"] = 1;

$tj["transfer_num"] = 1;

$tj["person"] = "哈发";

$tj["district_id"] = "173";

$tj["phone"] = "13617291144";

$tj["back_phone"] = "";

$tj["agent"] = "1";

// $tj["images"] = '[[{"image":"gjfs22/M00/9D/6B/CgEHGFbKhUHqaCaGAAEsbn-R2I4860.jpg","thumb_image":"gjfs22/M00/9D/6B/CgEHGFbKhUHqaCaGAAEsbn-R2I4860_80-80c_6-0.jpg","width":609,"height":600,"id":"SWFUpload_1_0","is_new":true}],[]]';

$tj["images"] = '[[{"image":"http://7jpnot.com1.z0.glb.clouddn.com/U94F61N6836I_800-600_6-0.jpg","thumb_image":"http://7jpnot.com1.z0.glb.clouddn.com/U94F61N6836I_800-600_6-0.jpg","width":609,"height":600,"id":"SWFUpload_1_0","is_new":true}],[]]';

$tj["ad_title"] = "性价比高4444";

$tj["description"] = "性价比高、包过户费等 性价比高、包过户费等 性价比高、包过户费等";

$tj["imageSecond"] = "";

$tj["vin"] = "";

$tj["id"] = "0";

 

$response = $curl->post($url,$tj);

file_put_contents('2.html', $response);

echo ($response);exit;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

Highlighting 显示行号并对齐

Continue Read..

参考这里 http://idodev.co.uk/2013/03/syntax-highlighting-with-highlightjs/

 

添加jquery代码

//numbering for pre>code blocks
$(function(){
    $('pre code').each(function(){
        var lines = $(this).text().split('\n').length - 1;
        var $numbering = $('
    ').addClass('pre-numbering'); $(this) .addClass('has-numbering') .parent() .append($numbering); for(i=1;i<=lines;i++){ $numbering.append($('
  • ').text(i)); } $('.pre-numbering li').css("height",$('pre code').height()/lines); }); });

添加css

 

pre {
    position: relative;
    margin-bottom: 24px;
    border-radius: 3px;
    border: 1px solid #C3CCD0;
    background: #FFF;
    overflow: hidden;
	padding:0px;
}

code {
  display: block;
  padding: 12px 24px;
  overflow-y: auto;
  font-weight: 300;
  font-family: Menlo, monospace;
  font-size: 0.8em;
}

code.has-numbering {
    margin-left: 21px;
}

.pre-numbering {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    padding: 12px 2px 12px 0;
    border-right: 1px solid #C3CCD0;
    border-radius: 3px 0 0 3px;
    background-color: #EEE;
    text-align: right;
    font-family: Menlo, monospace;
    font-size: 0.8em;
    color: #AAA;
}

对齐的地方就是$('.pre-numbering li').css("height",$('pre code').height()/lines); 基本对齐,处女座人士使用无效!!!

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权