1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Generating content using RegEx on PHP

Discussion in 'Cloaking and Content Generators' started by MrSomeo, Mar 17, 2014.

Tags:
  1. MrSomeo

    MrSomeo Newbie

    Joined:
    Jan 17, 2014
    Messages:
    3
    Likes Received:
    0
    Example:
    (Hi|Hello), I am (stranger|student|fireman) and I am looking where to buy some (milk|chocolate)

    How it is called and are there any scripts on PHP that would help me decode this kind of expression, when only one word is selected from the brackets. Possible result could be: "Hello, I am stranger and I am looking where to buy some milk".
     
  2. davids355

    davids355 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 25, 2011
    Messages:
    8,781
    Likes Received:
    6,320
    Home Page:
    Lol. This is called spintax not regex.

    and yes, if you google php spintax script, you'll find loads of info.
     
    • Thanks Thanks x 1
  3. RAYRAY7

    RAYRAY7 Regular Member

    Joined:
    Nov 17, 2007
    Messages:
    305
    Likes Received:
    196
    Please, remember content is the underlying foundation of your website. You can deny you created the backlinks and Google might forgive you, but you cannot deny questionable content on your money site. Find a good writer and have content written for your money site and your tier one backlinks. Just thought you should know, Goodluck which ever way you decide to follow.
     
    • Thanks Thanks x 2
  4. BlackHatCloaker

    BlackHatCloaker Newbie

    Joined:
    Oct 12, 2013
    Messages:
    21
    Likes Received:
    1
    Occupation:
    Cloaking
    Location:
    Europe
    Home Page:
    Here you go

    Code:
    [COLOR=#000000]<?
    $body = stripslashes($_POST['body']);
    
    for ($j=0; $j< 10; $j++) {
    $pattern = '/\{([^{}]*)\}/si';
    preg_match_all($pattern,$body,$matches);
    for ($i=0; $i< count($matches[0]); $i++) {
    $search = explode("|",$matches[1][$i]);
    srand((float)microtime() * 1000000);
    shuffle($search);
    $body = str_replace($matches[0][$i],$search[0],$body);
    }
    }
    
    //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    $titles = stripslashes($titles);
    
    for ($j=0; $j< 10; $j++) {
    $pattern = '/\{([^{}]*)\}/si';
    preg_match_all($pattern,$titles,$matchtitles);
    for ($i=0; $i< count($matchtitles[0]); $i++) {
    $search3 = explode("|",$matchtitles[1][$i]);
    srand((float)microtime() * 1000000);
    shuffle($search3);
    $titles = str_replace($matchtitles[0][$i],$search3[0],$titles);
    }
    }
    
    $title = explode("|",$titles);
    shuffle($title);
    
    //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    $summary = stripslashes($_POST['summary']);
    for ($j=0; $j< 10; $j++) {
    $pattern = '/\{([^{}]*)\}/si';
    preg_match_all($pattern,$summary,$matches);
    for ($i=0; $i< count($matches[0]); $i++) {
    $search = explode("|",$matches[1][$i]);
    srand((float)microtime() * 1000000);
    shuffle($search);
    $summary = str_replace($matches[0][$i],$search[0],$summary);
    }
    }
    
    
    //#################################################################
    #################Originally made by itrevor
    $resourcebox = stripslashes($_POST['resourcebox']);
    
    for ($j=0; $j< 10; $j++) {
    $pattern = '/\{([^{}]*)\}/si';
    preg_match_all($pattern,$resourcebox,$matchresource);
    for ($i=0; $i< count($matchresource[0]); $i++) {
    $search2 = explode("|",$matchresource[1][$i]);
    srand((float)microtime() * 1000000);
    shuffle($search2);
    $resourcebox = str_replace($matchresource[0][$i],$search2[0],$resourcebox);
    }
    }
    
    $article_title = trim($title[0]);
    $article_summary=stripslashes($summary);
    $article_body = stripslashes(trim($body));
    $resource_box = $resourcebox;
    ?>[/COLOR]
    
     
    • Thanks Thanks x 1