请最大化的利用好Google Keyword Planner

找不到需求,对用户不熟悉,定位不准确等等一系列问题,很多时候我们都可以通过Google Keyword Planner来解决。

举个例子,你知道用户会在搜索引擎上搜索什么样的词语吗?至少要回答10以上不同类型的词语。如果你对用户只是有一点点熟悉,你肯定难以回答上来。

那么可以通过该工具来强化你对用户的熟悉程度。

你要非常熟悉你的客户 用户,别无他法!

我是一个差的内容制作者

从这张图看,这是我做的三个网站,如果从跳出率来看,那么第一个网站的最好。它是一个工具性网站,我没花多大力气去做,只是写了几个正则匹配而已。

第二个是搞笑视频分享,我花了很多的力气去改写程序,做CDN部署,收集搞笑视频,做adwords广告等等,花的精力最多,但是可以看的出来跳出率还是很高,说明用户并不是很喜欢。而且从这些我也反思自己,不熟悉用户的情况下,你做到累死,用户也不会觉得要喜欢你,累死就累死,关他什么事? 不熟悉用户就是找死。

第三个网站,是这个博客,跳出率最高。估计这里的内容更加不吸引人,但却是我的自由之地,我自己很喜欢。(不要被高session迷惑,那是监控工具产生的)

总结:我做内容,用户多数情况下是不喜欢的,反而做工具,只要实现了用户的目的,他们会很喜欢。那么我就强化这项长处吧!
Sessions / Avg. Session Duration / Bounce Rate / Goal Conversion Rate
QQ图片20160524205014

PHP curl support 301/302

<?php
exit;
$r = curl_get('https://instagram.com/p/BE68tc_BQeV/');
echo $r;
 
 
//only support get, no post, support 301/302
function curl_get($url,$headerShow = true,$loop=0)
{
    $loop++;
    if($loop>3)return false;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_HEADER, $headerShow);
    //curl_setopt($ch, CURLOPT_POSTREDIR, 3); //follow redirect with the same type of request both for 301 and 302 redirects.
    //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //follow redirect, 5 times max
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
    $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
    $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
    $header[] = "Cache-Control: max-age=0";
    $header[] = "Connection:keep-alive";
    $header[] = "Keep-Alive: 300";
    $header[] = "Accept-Language: en-US,en;q=0.8,ja;q=0.6,zh-CN;q=0.4,zh;q=0.2,zh-TW;q=0.2";
    $header[] = "Pragma:no-cache"; // browsers keep this blank.
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    $result = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
 
    //if httpCode=301 or 302
    if (($httpCode == 301 || $httpCode == 302))
    {
 
        //var_dump($result);
        $headerInfo = '';
        $headerArr = explode("\n", $result);
        foreach($headerArr as $v){
            if(stristr($v,'Location')){
                $headerInfo = $v;
                break;
            }
        }
        //var_dump($headerInfo);
        preg_match('/Location:(.*)/', $headerInfo, $matches);
        //var_dump($matches);
        $url = parse_url(trim($matches[1]));
        if (!$url)
        {
            //couldn't process the url to redirect to
            //write log
            $time = date('Y-m-d H:i:s');
            $error = "couldn't process the url to redirect to";
            $log = "{time:$time}{code:$httpCode}{error:$error}\r\n";
            file_put_contents('/home/xxx/log_curl_get.php', $log,FILE_APPEND);
        }
 
        $last_url = parse_url(curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
        //var_dump($url);
        //var_dump($last_url);
 
        $new_url['scheme'] = !isset($url['scheme']) ? $last_url['scheme'] : $url['scheme'];
        $new_url['host'] = !isset($url['host']) ? $last_url['host'] : $url['host'];
        $new_url['path'] = !isset($url['path']) ? $last_url['path'] : $url['path'];
        $new_url['query'] = !isset($url['query']) ? $last_url['query'] : $url['query'];
 
        $new_url = $new_url['scheme'] . '://' . $new_url['host'] .'/'. $new_url['path'] .'?'. $new_url['query'];
        //echo $new_url;
        return curl_get($new_url,true,$loop);
    } elseif($httpCode=='200')
    {
        //delete the header
        $result = removeHeader($result);
    }
 
    if ($httpCode != '200')
    {
        $result = false;
        //write log
        $time = date('Y-m-d H:i:s');
        $error = curl_error($ch);
        $log = "{time:$time}{code:$httpCode}{error:$error}\r\n";
        file_put_contents('/home/xxx/log_curl_get.php', $log,FILE_APPEND);
    }
    curl_close($ch);
    return $result;  
}
 
 
 
 
 
 
 
//only support post, no get, support 301/302
function curl_post($url, $data = array(), $headerShow = true,$loop=0)
{
    $loop++;
    if($loop>3)return false;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_HEADER, $headerShow);
    //curl_setopt($ch, CURLOPT_POSTREDIR, 3); //follow redirect with the same type of request both for 301 and 302 redirects.
    //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //follow redirect, 5 times max
    curl_setopt($ch, CURLOPT_POST, true);
    if (!empty($data))
    {
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    }
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
    $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
    $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
    $header[] = "Cache-Control: max-age=0";
    $header[] = "Connection:keep-alive";
    $header[] = "Keep-Alive: 300";
    $header[] = "Accept-Language: en-US,en;q=0.8,ja;q=0.6,zh-CN;q=0.4,zh;q=0.2,zh-TW;q=0.2";
    $header[] = "Pragma:no-cache"; // browsers keep this blank.
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    $result = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
 
    //if httpCode=301 or 302
    if (($httpCode == 301 || $httpCode == 302))
    {
        //var_dump($result);
        $headerInfo = '';
        $headerArr = explode("\n", $result);
        foreach($headerArr as $v){
            if(stristr($v,'Location')){
                $headerInfo = $v;
                break;
            }
        }
        //var_dump($headerInfo);
        preg_match('/Location:(.*)/', $headerInfo, $matches);
        //var_dump($matches);
        $url = parse_url(trim($matches[1]));
        if (!$url)
        {
            //couldn't process the url to redirect to
            //write log
            $time = date('Y-m-d H:i:s');
            $error = "couldn't process the url to redirect to";
            $log = "{time:$time}{code:$httpCode}{error:$error}\r\n";
            file_put_contents('/home/xxx/log_curl_post.php', $log,FILE_APPEND);
        }
 
        $last_url = parse_url(curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
 
        $new_url['scheme'] = !isset($url['scheme']) ? $last_url['scheme'] : $url['scheme'];
        $new_url['host'] = !isset($url['host']) ? $last_url['host'] : $url['host'];
        $new_url['path'] = !isset($url['path']) ? $last_url['path'] : $url['path'];
        $new_url['query'] = !isset($url['query']) ? $last_url['query'] : $url['query'];
 
        $new_url = $new_url['scheme'] . '://' . $new_url['host'] .'/'. $new_url['path'] .'?'. $new_url['query'];
        return curl_post($new_url,$data,$headerShow,$loop);
    }elseif($httpCode=='200')
    {
        //delete the header
        $result = removeHeader($result);
 
    }
 
    if ($httpCode != '200')
    {
        $result = false;
        //write log
        $time = date('Y-m-d H:i:s');
        $error = curl_error($ch);
        $log = "{time:$time}{code:$httpCode}{error:$error}\r\n";
        file_put_contents('/home/xxx/log_curl_post.php', $log,FILE_APPEND);
    }
    curl_close($ch);
    return $result;
}
 
function removeHeader($result){
    preg_match("/(.*)\r\n\r\n/iU",$result,$matchs);
    $startPos = strpos($result,$matchs[0])+strlen($matchs[0]);
    $result = substr_replace($result,'',0,$startPos);
    if(preg_match('/^HTTP/iU',$result) && strstr($result,'Content-Length:') && strstr($result,'Content-Type')){
        return removeHeader($result);
    }
    return $result;
}

花了太多的时间写代码

花了太多的时间写代码,这是程序员创业通常最喜欢干的事情。擅长并且有很大的优势,这在战术上非常非常好的长处,但是纵观全局,由于其他工作的时间被挤压,不能平衡其他工作,那么从全局来看这不是一件好事情。

怎么改变?

创业者每天都很忙,早上起来还没睁开眼睛,估计就想着今天要干点什么了,之前我基本遵循的原则“重要的事情并且不怎么样想做的,早上精力最充沛的时候做”。这个原则非常管用,让我随时知道当前的重点是什么。但有时候真的是想不起来(不是忘记)代码之外的,非常重要的事情,例如访谈用户,竞争对手调查,市场推广等等,这些针对外部的东西。因为内在的东西我们往往都很熟悉,但却想不起外部正在变化。

每个月制定大局计划及大局计划的落实。