English 中文(简体)
摘自领域
原标题:Extracting words from domain

I have a bunch of domains I would like to explode into words. I downloaded wordlist from wordlist.sourceforge.net and started writing brute-force type of script to run each domain through dictionary list.

问题是,我无法取得足够结果。 我所看到的简单文字是:

foreach($domains as $dom) {
    $orig_dom = $dom;
    foreach($words as $w) {
        $pos = stristr($dom,$w);
        if($pos) {
            $wd[$orig_dom][] = $w;
        }
    }
}

词是字典阵列,范围只是一系列域名。

结果是:

[aheadsoftware] => Array
    (
        [0] => ahead
        [1] => head
        [2] => heads
        [3] => soft
        [4] => software
        [5] => ware

从技术上讲,它行之有效,但我不知道如何制定法典,以了解,如果你走到前面,你就不会有头脑或头脑。 还应当理解选择软件而不是软硬件。 我知道,语言计算的世界是纯疼痛;

最佳回答

一种冷静的解决办法是,每当你们有一席之地时,在你在结果上加上一字之后,再看另一个“<>stristr,看看看你是否试图将结果落实到这里的任何词语中。 如果是的话,不增加。

举例来说,如果该领域包含头脑和你的字典清单,这不会奏效。 否则,各位负责人可能会在结果中增加而不是头脑。

你们可以通过检查一下哪一个更长的时间来克服这一限制。 如果你的结果中所含的字数更长,则不增加新字。 如果新字更长,删除已经取得的成果,并增加新的内容。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签