我已经使用Google Websearch API超过1年了.该服务于2010年11月被弃用,但仍在继续提供迄今为止的结果.最近,谷歌已经开始对这个已弃用的服务强制执行每天1000次查询(?)限制.我发誓,上个月我在一天内完成了超过10,000次API调用,没有任何服务错误(相同的IP,相同的API密钥).
所以我想我的问题是有没有人找到替代品呢?我知道雅虎的老板非常好,但我在Google上专门为我的项目工作.只要我能从谷歌获得64个结果,我不介意花钱购买这项服务.
在这个想法上,像Zoomrank这样的服务如何能够绕过谷歌的所有限制?我订阅了Zoomrank,我可以获得所有关键字的每日排名.他们是否与谷歌有合作关系,或者他们只是访问一些我不知道的秘密服务.
有些人建议使用新的谷歌自定义搜索,但我不知道这有助于我如何搜索网页?Google CS仅限于您在这些引擎中创建和搜索的CSE.如果我正在寻找Pizza的网络搜索结果,Google CS对我没有帮助.
感谢您的输入.非常感激
所以这是我今天学到的一个有趣的问题.
从过去的一个月开始,我需要填充过去12个月的数组.所以在2011年8月,过去12个月将是2010年9月 - 2011年7月.为此,我使用:
for ($i = 1; $i <= 12; $i++)
$months[] = date("Y-m%", strtotime("-$i months"));
Run Code Online (Sandbox Code Playgroud)
上面的代码在8月30日运行正常.我过去12个月:
array
0 => string '2011-07%' (length=8)
1 => string '2011-06%' (length=8)
2 => string '2011-05%' (length=8)
3 => string '2011-04%' (length=8)
4 => string '2011-03%' (length=8)
5 => string '2011-02%' (length=8)
6 => string '2011-01%' (length=8)
7 => string '2010-12%' (length=8)
8 => string '2010-11%' (length=8)
9 => string '2010-10%' (length=8)
10 => string '2010-09%' (length=8)
11 => string '2010-08%' (length=8)
Run Code Online (Sandbox Code Playgroud)
但是当我在8月31日运行时,我得到: …
我有一些旧的迁移文件包含不可打印的字符.我想找到所有具有此类名称的文件,并从系统中完全删除它们.
例:
ls -l
-rwxrwxr-x 1 cws cws 0 Dec 28 2011 ??"??
ls -lb
-rwxrwxr-x 1 cws cws 0 Dec 28 2011 \a\211"\206\351
Run Code Online (Sandbox Code Playgroud)
我想找到所有这些文件.
以下是我ls在此类文件夹中执行操作时所看到的示例屏幕截图:

我想用不可打印的字符找到这些文件,然后删除它们.
我的Linux机器上有一个项目,其中包含在Windows中被视为非法/保留的字符的文件(http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx).该项目在多个文件夹中有超过10,000个文件,我将识别这些文件的路径.
我可以find . -name "*\?*"为每个非法/保留字符,但是有一种更简单的方法来查找包含的所有文件< > : " / \ | ? *
一旦我确定了,我想从每个文件中删除所有这些字符.
我有这个表,我们称之为表一.
+----+---------+-----------------+
| id | link_id | url |
+----+---------+-----------------+
| 1 | 1 | www.example.com |
| 2 | 1 | www.abc.com |
| 3 | 1 | www.test.com |
| 4 | 1 | www.t1.com |
| 5 | 1 | www.newtest.com |
| 6 | 1 | www.testing.com |
| 7 | 1 | www.abc.com |
| 8 | 1 | www.example.com |
| 9 | 1 | www.web1.com |
| 10 | 1 | www.web2.com | …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个简单的MVC,我个人使用,我真的可以使用这个简单问题的答案
class theParent extends grandParent{
protected $hello = "Hello World";
public function __construct() {
parent::__construct();
}
public function route_to($where) {
call_user_func(array("Child", $where), $this);
}
}
class Child extends theParent {
public function __construct() {
parent::__construct();
}
public function index($var) {
echo $this->hello;
}
}
$x = new theParent();
$x->route_to('index');
Run Code Online (Sandbox Code Playgroud)
现在Child::index()这会引发一个致命的错误:Using $this when not in object context但如果我使用echo $var->hello,它就可以了.
我知道我可以$var用来访问父母的所有属性,但我宁愿使用$this.
因此谷歌在 2006 年撤回了 SOAP API,并在去年贬值了 REST API。尽管 REST api 仍然工作正常,但我想知道这里是否有人知道网络搜索的替代方案。我不是在谈论自定义搜索 API(那东西每天的查询次数限制为 100 次,这太可怕了)。
另外,我目前正在将 REST api 用于自定义应用程序。如果我在查询中传递搜索运算符(例如 inurl: 或 site:),我注意到会出现混合(且非常不可靠)的结果。有谁知道这些是否可以与 REST Api 一起使用?
任何人都可以使用shell脚本快速提取给定句子中的所有主题标签.
例如:
'This is a #test that will #allow me to #remove stuff'会回来#test #allow #remove
我有以下代码:
DEFINE('DEFINEDTESTVAR', 'Hello World');
function callit($callVar) {
echo "The call is ".$callVar;
}
$passthis = 'DEFINEDTESTVAR';
callit($passthis);
Run Code Online (Sandbox Code Playgroud)
我知道我能做到,callit(DEFINEDTESTVAR)但那不是我想要做的.可能吗?
我知道有无数的线程提出这个问题,但我找不到能帮助我解决这个问题的线程.
我基本上试图解析大约10,000,000个URL的列表,确保它们符合以下条件,然后获取根域URL.此列表包含您可以想象的所有内容,包括(和预期的格式化URL)之类的内容:
biy.ly/test [VALID] [return - bit.ly]
example.com/apples?test=1&id=4 [VALID] [return - example.com]
host101.wow404.apples.test.com/cert/blah [VALID] [return - test.com]
101.121.44.xxx [**inVALID**] [return false]
localhost/noway [**inVALID**] [return false]
www.awesome.com [VALID] [return - awesome.com]
i am so awesome [**inVALID**] [return false]
http://404.mynewsite.com/visits/page/view/1/ [VALID] [return - mynewsite.com]
www1.151.com/searchresults [VALID] [return - 151.com]
Run Code Online (Sandbox Code Playgroud)
有没有人对此有任何建议?