Search (advanced search) | ||||
Use this Search form before posting, asking or make a new thread.
|
04-22-2019, 07:58 PM
Post: #1
|
|||
|
|||
Script Required Please
Hi
First of all sorry about my poor English. I need a script/plugin for spinning articles in this format; {health|fitness|energy} Thank You so Much in Advance |
|||
04-27-2019, 08:21 PM
Post: #2
|
|||
|
|||
RE: Script Required Please
Made this for you say thanks and add reps
<?php if (isset($_POST['submit'])) { $content = $_POST['content']; } else { echo "Your form is not submitted yet please fill the form and visit again"; } function spinaround($content) { preg_match_all('/{(.*)}/sU',$content,$matches); foreach ($matches[0] as $k=>$v) { $string = $matches[1][$k]; if ( preg_match_all('/\[(.*)\]/sU',$string,$stringmatches) ) { foreach ($stringmatches[0] as $l=>$w) { $new = explode('|',$stringmatches[1][$l]); $new = $new[array_rand($new)]; $string = str_replace($w,$new,$string); } } $new = explode('|',$string); $new = $new[array_rand($new)]; $content = str_replace($v,$new,$content); } return $content; } ?> <!DOCTYPE html> <html> <body> <h2>Article Spinner</h2> <p>Enter Text To Spin</p> <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" > <textarea name="content" style="width:100%; height:100%;">The {quick|fast} {brown|black} {fox|[fat|skinny] dog|cat} jumps {over|above [and beyond|and below]|around} the {[overly|somewhat] lazy|sleepy} {horse|cow|donkey}</textarea> <br> <input type="submit" name="submit"> </form> <p>Article Spinner by FRED BEnt!</p> <textarea name="content" style="width:100%; height:100%;"><?php echo spinaround($content);?></textarea> </body> </html> |
|||