Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <title> News Gnerator </title>
- <style>
- h2 {
- left: 10px;
- width: 650px;
- color: #223366;
- font: 36px Helvetica, Sans-Serif;
- letter-spacing: -1px;
- }
- .title {
- width:100%;
- margin-left: 14px;
- margin-bottom: 4px;
- color: #FFFFFF;
- font: 62px Impact, Charcoal, sans-serif;
- }
- p {
- color: #223366;
- font: 18px Helvetica, Sans-Serif;
- }
- a:link {
- text-decoration: none;
- }
- a:visited {
- text-decoration: none;
- }
- a:hover {
- text-decoration: none;
- }
- a:active {
- text-decoration: none;
- }
- html, body {
- overflow-x: hidden;
- padding: 0px;
- margin: 0px;
- background-color: #FCFCFC;
- }
- li {
- margin-top:8px;
- padding-left: 1em;
- text-indent: -.7em;
- }
- li:before {
- content: "• ";
- color: #bc0000;
- }
- .header {
- padding: 0px;
- margin: 0px;
- width: 100%;
- height:138px;
- background-color: #183653;
- border-bottom: 4px solid #bc0000;
- }
- .logo {
- margin-bottom: 0px;
- }
- .image {
- float: left;
- margin-right: 25px;
- }
- .smallPic {
- vertical-align: bottom;
- display: inline-block;
- margin-left: 10px;
- height:150px;
- }
- .links {
- margin: 0px;
- padding: 0px;
- position: relative;
- left: 20px;
- margin-top: 0px;
- }
- .link {
- margin-right: 36px;
- color: #FBFBFB;
- font: 16px Helvetica, Sans-Serif;
- }
- .smallText {
- list-style: none;
- color: #223366;
- font: 11px Helvetica, Sans-Serif;
- }
- .smallGreyText {
- list-style: none;
- color: #888888;
- font: 13px Helvetica, Sans-Serif;
- }
- .wimg {
- position: relative;
- top:6px;
- right:8px;
- }
- .rightText {
- margin-left: 10px;
- width: 144px;
- color: #223366;
- font: 11px Helvetica, Sans-Serif;
- }
- .rightTextLarge {
- margin-top: 0px;
- margin-bottom: 5px;
- margin-left: 10px;
- color: #223366;
- font: 18px Helvetica, Sans-Serif;
- }
- .page {
- width:650px;
- margin: 75px;
- display: inline-block;
- position: static;
- left:5%;
- }
- .rightPage {
- vertical-align: bottom;
- margin-bottom: 100px;
- width: 400px;
- display:inline-block;
- height: 400px;
- }
- .main {
- height: 100%;
- }
- </style>
- <script>
- var msg = new SpeechSynthesisUtterance();
- var voices = window.speechSynthesis.getVoices();
- </script>
- </head>
- <body>
- <!-- Gnerator! -->
- <?php
- //RATT GNERATOR LIB v0.002b
- //get
- $simpl=0;
- if (isset($_GET["wobl"])){
- $simpl=1;
- }
- //SQL stoff
- $servername = "localhost";
- $username = "gnerator";
- $password = "bobman";
- $dbname = "gnerator";
- $servername = "shovelpilecom.ipagemysql.com";
- $username = "bobman";
- $password = "bobman";
- $dbname = "gnerator";
- // Create connection
- //$conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- //if ($conn->connect_error) {
- // die("uh oh Connection failed: " . $conn->connect_error);
- //}
- $save_string=databaseWord("nouns");
- $save_string2=databaseWord("nouns");
- $save_string3=databaseWord("nouns");
- $gnerator_save=0;
- $gnerator_save2=0;
- $gnerator_save3=0;
- $ucf=0;
- $an=0;
- $plur=0;
- $remS=0;
- //$example = $wordsApi->getRandomWords("verb", null, null, null, null, null, null, null, null, null, null, 1);
- //$example=$wordApi->getRelatedWords("cat","synonym","false","20");
- //print $example[0]->words[rand(0,count($example[0]->words)-1)];
- $cels=rand(-20,35);
- $tmpCels=rand(1,10);
- if ($tmpCels==1){$cels=rand(-70,70);}
- $minutes=rand(2,60);
- $hours=rand(2,48);
- $days=rand(2,30);
- $born=rand(1750,1990);
- $baitNum=rand(2,40);
- $tmpYear=rand(1,3);
- if ($tmpYear==1) {$year=rand(1750,2016);}
- if ($tmpYear==2) {$year=rand(1910,2016);}
- if ($tmpYear==3) {
- $tmpYear2=rand(1,8);
- if ($tmpYear2==1) {$year=rand(1914,1918);}
- if ($tmpYear2==2) {$year=rand(1939,1945);}
- if ($tmpYear2==3) {$year=1453;}
- if ($tmpYear2==4) {$year="4 BC";}
- if ($tmpYear2==5) {$year=1492;}
- if ($tmpYear2==6) {$year=1776;}
- if ($tmpYear2==7) {$year=1848;}
- if ($tmpYear2==8) {$year=1865;}
- }
- $bornday=rand(1,30);
- $bornmonth=get_month(rand(1,12));
- $died=$born+rand(40,120);
- $diedday=rand(1,30);
- $diedmonth=get_month(rand(1,12));
- $percent=rand(0,100)."%";
- $lifetime="";
- $was="was";
- $gender=rand(1,2);
- $items=array();
- $tmpAss=rand(1,6);
- if ($tmpAss==1 || $tmpAss==2) {$assets=rand(0,10000); $rich=1;}
- if ($tmpAss==3 || $tmpAss==4) {$assets=rand(0,100000); $rich=2;}
- if ($tmpAss==5 || $tmpAss==6) {$assets=rand(0,10000000); $rich=3;}
- if ($gender==1) {$she="he"; $male="male";}
- if ($gender==2) {$she="she"; $male="female";}
- if ($died>2016){$died=0;}
- if ($died>0) {$lifetime="("."$bornday $bornmonth $born - $diedday $diedmonth $died".")";}
- if ($died==0) {$lifetime="(born ".$born.")"; $was="is";}
- //$lines=file('nouns.txt');
- //for ($i=0; $i<count($lines);$i++){
- // $lines[$i]=rtrim($lines[$i]);
- //}
- //define data!
- //"&an <b> &save &remS &random nouns1 && &save2 &remS &random nouns1 </b> is &an &load2 with &plur &load |part2"
- $gnerator_data=array(
- array("debug_start","|recipe"),
- array("save","&save &random nouns2 &save2 &random nouns2 &save3 &random nouns3"),
- array("start","&ucf |person |known &' &ucf |slogan '& |does","&ucf |person |does","&ucf |person |examines |himself &, |confirms","|country |says it |did |countryDid","|location |business |orgAccused |racism |orgAction","|location |police |searching |person for |action","|police |baffled after |person |steals |obj","|person |accused |selling |drugs on |boat","|person says he |regrets |action","|person spends |time |action","|scientists |predict |prediction","|org |feelers how |republicans would react to |new |event","|person &: &' &ucf |quote &!'","|scientists find |result","|inventors |develop |new |objAdj |obj","|person |says &' &ucf |quote '&","|person |nearly |does","|picture","|person |gives |person |objAdj |obj from |country","|racism |thriving in |location","|doctor claims most |patients |straight by the time |doctor2","|person was |arrested yesterday for |action","|result according to |research |funded &load2 |company","There is no &save2 |event in &save |country &, says &load &'s top &load2 |company","|person |hurt after treating |sickness with |drugs instead of |medicine","|song - New single by |band out now!","&save2 |obj |thieves leave man's &load2 behind |after_discovering |it_is |objAdj","|recipe"),
- array("does","can't name any |adj &load","|arrested |after |action","|sells |objAdj |obj","|hurt in accident involving |objAdj |obj","experiences |event","|inPocket |org","|eats |obj"),
- array("action","shooting at |citePerson","smuggling |loads of |drugs","|saying &' |quote '&","having |sex with |person","calling for |event","|killing |animal with |drugs","|stealing |objAdj |obj","|raising |children","conducting |illegalBusiness in |country","|forgetting to |feed his |animal","|feeding |person |amount |drugs","|playing &' &ucf |song '& while |action"),
- array("orgAction","|sells |statue |resembling |person","when |leader found |action","","causes |event"),
- array("confirms","confirms he |is &an |republican","|finds |objAdj |obj","|refuses change |opinion |event","his |bodypart is |whereIt"),
- array("countryDid","|invade |country in $year","kill |org |leader","|proclaim |person as |leader"),
- array("prediction","|tomorrow will bring |event","the |obj of |tomorrow will be |objAdj","|objAdj |obj is the |drugs of |tomorrow","The |pet of |tomorrow will be the |animal && |animal"),
- array("result","owning &save2 |obj |more |rewarding than |action","$percent of |republicans still |decided whether to |vote |person or |person","$percent of |republicans have |tried &save2 |drugs","&save2 |drugs |completely |harmless"),
- array("picture","This |pic blows my mind","This |pic of |person is amazing","$baitNum pictures |clickbait","Gallery of |adj photographs","this |adj |pic was discovered in |location","Amazing |pic of |objAdj |obj","marvel at this incredible historical |pic from $year","<font COLOR='#BC0000'>WARNING GRAPHIC IMAGE: </font> |horrible |accident |maims |person","New species of |animal (pictured) discovered. |scientists baffled."),
- //person
- array("person","leave voter","Donald Trump","Hillary Clinton","Obama","Trump","Clinton","muslim","school shooter","Trumpite","crippled man","small dwarf","abomination of a man","woman","man","clown","hobo","self proclaimed &' &ucf |person '&","friend","my uncle","Bernie Sanders","|obj expert","tinder user","area man","|location man","gay |person","evil |person","Kim Jong Un","Anonymous informant let's just call him &' |obj '&","pope","televangelist","wall street banker","Alex Jones","|person supporter","Unabomber","|countrish man","|countrish |person","Andrew Breitbart","man on the street","|animal","Ted Cruz","tramp","Hugo Chavez","surgeon","&remS |drugs dealer","Xi Jinping","tankman","|org member","jesus christ |jesus |jesus |jesus","Mike Pence","God","salesman of |obj","Jill Stein","Gary Johnson","Ron Paul","Al Gore","Hillary &' &ucf |hillary '& Clinton","Rush Limbaugh","wealthy teen","pictured person","guy I met outside the office (pictured)","Putin","|countrish |leader |person","Noam Chomsky","|location mother","|location father","Donald &' &ucf |donald '& Trump","hitler","guy I like to call |person","|person impersonator","gay conversion therapist","netizen","reddit user","|fruit farmer","Boris Johnson","Marxist","that guy","anonymous whistleblower","Military Veteran","local DJ","|musician","Pepe the |animal","Zimbabwean financial minister","naked man","former child star"),
- array("republican","republican","democrat","demon","human","cool dude","bad motherfucker","&random nounsX","independent","kike","monster","jew","american","|obj vandal","man","|adj man","clown","immigrant","|animal"),
- array("republicans","republicans","democrats","thieves","rappers","vandals","&plur |republican","terrorists","midgets","|adj people","kikes","jews","a large part of the population of |country","public","racists","clowns","crabbers","terrorists","the left","liberals","|org","autists","Islamic State Fighters","netizens","pretty much the entire following of |person","immigrants","senators","|countrish |republicans","|animal handlers","chimney sweepers","celebrities","cops"),
- array("scientists","scientists","researchers","experts","boffins","oracles","futurologists","people","|republicans","studies","|location polls","polls"),
- array("inventors","inventors","scientists","researchers","|republicans","alchemists","engineers","boffins","|adj |inventors"),
- //stoff
- array("accident","accident","mishap","disaster","misadventure"),
- array("after_discovering","after discovering","after finding out","because","after determining","when learning","after noticing"),
- array("animal","cat","dog","crow","crocodile","camel","horse","|fruit","goose","ostrich","turkey","|animal && |animal","goat","snake","pelican","frog","crab","hostage","&random nounsX","gecko","cow","kangaroo","beetle","gnome","human","bear","raccoon","duck","worm","tiger","clam","turtle","piglet"),
- array("arrested","arrested","jailed","caught","shot to death","incarcerated","under arrest","confined","detained","locked up","in chains","fined"),
- array("bodypart","pussy","nose","tit","butt","asshole","hair","neck","vulva","dick","cock","nipple","leg","tongue","eye","beard","head","chest","hand","penis","kidney"),
- array("box","box","barrel","container","bag","bucket","toilet","backpack"),
- array("applaud","applaud","condone","hate","like","forget","disregard","nod at","dislike","acknowledge","point to","approve of"),
- array("clickbait","that will blow your mind","you have never seen before","that will amaze your friends","of |person","from |country"),
- array("children","children","kids","offspring","&plur |animal"),
- array("cruel","cruel","unethical","fair","barbarous","brutal","heartless","depraved","compassionate"),
- array("completely","completely","totally","absolutely","effectively","pretty much","perfectly","utterly"),
- array("company","company","corporation","lobby","organisation","manufacturer","union","association","dealer","advocate","legalization campaigner","minister"),
- array("color","red","green","blue","violet","orange","black","white","grey","indigo","pink","turquoise","azure","brown","cyan","yellow"),
- array("decided","decided","undecided","not sure","dubious","indecisive","unconvinced","uncertain","open"),
- array("develop","develop","invent","discover","unearth","evolve","grow","cultivate","construct","dream up"),
- array("duet","duet","twins","|republicans","|obj"),
- array("doctor","doctor","gay conversion therapist","experimental surgeon","unemployed nurse","|certified |doctor","lactation educator","'Medical' doctor","doctor of philosophy","certified sports specialist","experimental masseuse","dentist","gynecologist","unlicensed |doctor","biologist","dr frankenstein","surgeon","man claiming to be &an |doctor"),
- array("doctor2","they commit suicide","they leave his office","he's done with them","they stop fighting back","they give in","the procedure is completed","the effects of the |drugs wear off","|time","their |bodypart is taken care of"),
- array("donald","the donald","agent orange","bratman","the human corncob","darth hater","hair fuhrer","k-mart ceasar","the angry cheeto","ghengis can't","the xenophobic sweet potato","prima donald","the white kayne","dire abby","the tanning bed warning label","tangerine jesus","the feral shouting meatball","the talking yam","mango mussolini","cinnamon hitler","cheeto benito","|donald |donald |donald","|donald |donald"),
- array("eat","eat","cook","ingest","snort","insert","use","inject"),
- array("eats","eats","boils","ingests","inserts","has |sex with"),
- array("failure","failure","success","misstep","implosion","misadventure","adventure","wreck","achievement","triumph","attainment"),
- array("feeding","force feeding","feeding","lending","supplying","handing","selling"),
- array("fondly","fondly","yearningly","affectionately","longingly"),
- array("forgetting","forgetting","remembering","failing to remember","not being able to"),
- array("fuck","fuck","cap","kill","love"),
- array("funded","funded by","conducted by","by","sponsored by"),
- array("fruit","peach","apple","banana","coconut","habanero","watermelon","meatloaf","pineapple","cucumber","eggplant","onion","springroll","marijuana","chocolate","pumpkin","wheat","maple-syrup","gherkin","bark"),
- array("gives","gives","sells","deals","hands"),
- array("grab","grab","pinch","clasp","slap","poke","fiddle","take"),
- array("feed","feed","pet","take care of","play with","remember","care for"),
- array("harmless","harmless","safe","safe for |animal consumption","digestible","kosher","non toxic","unobjectionable","unfit for |animal consumption"),
- array("her","her","him"),
- array("hillary","shillary","hildebeest","killary","defender of child rapists","wealth pirate","leader of the party of death","rotten","heil hillary","klinton","crooked hillary","wicked witch of the west wing","hilla the hun","robbery hillham","mrs. carpetbagger","saint hillary","hitlery","ILLary","McPresident","Wife of Dollar Bill","Commander-in-thief","the great pretender","|hillary |hillary |hillary","|hillary |hillary"),
- array("hold","hold","touch","kiss","see","feel","grip"),
- array("horrible","horrible","terrible","scary","bizzare","strange","awful","dreadful","gruesome"),
- array("hurt","hurt","killed","disfigured","harmed","maimed","mutilated","wounded","unhurt","suffers brain damage"),
- array("jesus","lamb of god","son of god","son of man","light of the world","son of david","last adam","saviour of |person","king of the jews","rabbi","the son","his only begotten son","the son of the father","his own son","wonderful","creator of |obj","|jesus |jesus","|jesus |jesus |jesus","jehovah","the lord of glory","my messenger"),
- array("known","&, known for wanting to","&, who wants to","&, famous for saying"),
- array("kissed","kissed","licked","ate","smooched","saw","touched"),
- array("new","new","new kind of","another type of","yet another","brand new","unheard of"),
- array("statue","statue","painting","piece of art","product","sculpture","|obj"),
- array("resembling","resembling","shaped like","similar to","named after","offending"),
- array("leader","leader","president","warlord","secretary","CEO","head","ruler","director","boss","worker","god emperor","|jesus","advisor","person of the year","dictator","consul"),
- array("illegalBusiness","illegal business","shady affairs","strange ritual","mysterious dealings","secretive negotiations","open transparent legal and ethical business"),
- array("is","is","is not"),
- array("invade","invade","have diplomatic relations with","have something to do with","attack"),
- array("inPocket","in pocket of","in cahoots with","paid off by","connected with"),
- array("it_is","it is","it is too","it's not","it is really","that it is way too","it to be quite"),
- array("time","$hours hours","$days days","$minutes minutes","a long time","afternoon","bathroom break","a while","all day","christmas","vacation"),
- array("regrets","regrets","does not regret","does not remember","apologizes for","admits to","approves of"),
- array("says","says","claims","asserts","affirms","proclaims","announces","discloses","reports","told by |person","admits"),
- array("did","did","did not","did in fact","did certainly not","did surely","did of course","did for a fact"),
- array("examines","smells","examines","searches","audits","checks","explores","inspects","investigates","probes","researches","screens","studies","appraises","takes stock of"),
- array("himself","himself","|person"),
- array("after","after","for","over"),
- array("maims","maims","disfigures","injures","mangles","crushes","kills","amuses"),
- array("metal","iron","steel","copper","bronze","boron","tin","lead","marble","aluminium","nickel","bismuth","cobalt","electrum","molybdochalkos","tumbaga","gallium","gold","indium","magnesium","mercury","silver","plutonium","potassium","rhodium","sodium","uranium","titanium","zinc","pewter"),
- array("medicine","medicine","antibiotics","|drugs","prescription drugs","exorcism","voodoo ritual"),
- array("more","more","less"),
- array("nearly","nearly","almost","barely","essentially","practically","virtually","pretty much"),
- array("natures","nature's","worlds","|country &'s"),
- array("orgAccused","previously accused of","known for","involved in","that had nothing whatsoever to do with"),
- array("opinion","opinion on","beliefs about","plans for","opposition to"),
- array("patients","patients","subjects","clients","applicants","patrons","fools","|republicans"),
- array("pic","picture","image","|adj |pic","painting","photograph","art","photo","print","panorama","beautiful picture"),
- array("raising","raising","rearing","breeding","nursing","nurturing","educating","fostering"),
- array("research","research","study","trials","analysis","investigation"),
- array("refuses","refuses to","does not want to","will not","will","is going to","will most likely","might","still wont"),
- array("rewarding","rewarding","fulfilling","profitable","fruitful","productive","satisfying","worthwhile","gainful","fun","doable"),
- array("tried","tried","experimented with","never |tried","smoked","ingested","used"),
- array("feelers","putting out feelers for","polling for","is trying to find out","is wondering","is investigating","tells us they know"),
- array("tomorrow","tomorrow","next year","next week","the future","next presidency","this century","the distant future"),
- array("too","too","not very","quite","all too","kind of"),
- array("pet","pet","companion","creature","cattle"),
- array("planet","the moon","mars","europa","pluto","jupiter"),
- array("predict","predict","say","forsee","conclude","envision","think","figure","guess","presume","forespeak"),
- array("proclaim","name","proclaim","announce","declare","deny"),
- array("baffled","baffled","stumped","amazed","befuddled","confused","dazed","dumbfounded","puzzled","floored","elated","indifferent"),
- array("saying","saying","proclaiming","exclaiming","blurting out","shouting","uttering","yelling","crying","stating"),
- array("steal","steal","drive off with","pilfer","kidnap","take","plagiarize","poach","snatch","make off with","take possession of"),
- array("steals","steals","drives off with","pilfers","kidnaps","takes","plagiarizes","poaches","snatches","makes off with","takes possession of"),
- array("stealing","stealing","snatching","acquiring","buying","creating","donating"),
- array("searching","searching for","looking for","hunting","pursuing","inspecting"),
- array("straight","straight","cured","healthy","in good condition","dead","completely |straight","free of |racism","done","normal","recovered","|adj"),
- array("strict","strict","rigorous","tough","oppressive"),
- array("titanic","titanic","great","wonderful","unexpected","ordinary","glorious","epic","nice enough"),
- array("thriving","thriving","on the rise","increasing","soon to be gone","is finally a thing in","now extinct","now illegal","legalized"),
- array("thieves","thieves","&& jackers","smugglers","robbers","burglars","bandits","muggers","swindlers"),
- array("playing","playing","singing","blasting","cranking out"),
- array("police","police","national guard","law enforcement","|republican","detective"),
- array("citePerson","&' &ucf |person '&","|person","|person"),
- array("tricking","tricking","misleading","deceiving","duping","hoodwinking","swindling","hoaxing"),
- array("accused","accused of","suspected of","found","sued for","denies accusations of","admits"),
- array("sells","sells","buys","gives away","steals","unearths","finds","reveals","releases"),
- array("finds","finds","unearths","discovers","stumbles upon"),
- array("again","again","for the first time","like |country","right now","next"),
- array("great","great","impressive","awesome","big","large","huge","immense","tremendous","jumbo","extravagant"),
- array("selling","selling","using","handling","making","cooking","dealing"),
- array("sex","sex","affair","baby","good times","coitus","'sexy time'","romantic dinner","fun night out","wild |drugs fueld night","deep conversation","emotional connection","family"),
- array("loads","loads","huge amount","small quantity","a few grams","boatload","barrel","legal amount","trunk full","a little bit","substantial amount","considerable amount","great amount","a dab","a nugget","frankly incredible amount","too much","a handful","totally insignificant number"),
- array("killing","killing","murdering","slaying","hitting","attacking","feeding","boiling"),
- array("vote","vote for","support","oppose","like","&random verbsX"),
- array("whatHappened","what happened","the events of","the lessons of","everything about","the memory of","the best year of my life,"),
- array("whereIt","where it belongs","at the place it is supposed to be","itching","|adj","still there","vaguely |obj like","as it should be"),
- array("song","|fuck tha |police","|person &'s song","Smells like |adj spirit","somebody to &random verbsX","All you need is |drugs","Light my |obj","Anarchy in |country","Hotel |location","1000 dollar |obj","One for my baby (And One More for the |obj &)","Working Class |republican","Sympathy for the |animal","|person in the sky with diamonds","I |kissed &an |animal and I liked it","I want to |hold your |bodypart","|bodypart of the |animal"),
- array("band","|musician","|band1"),
- array("musician","|mus1 |mus2"),
- array("mus1","Snoop","Katy","Kurt","David","Elvis","Bob","John","Jimi","Justin","Paul","Michael","Frank","Ludwig van","Neil","Lady","Ozzy","B.B.","Jay","Bruce","Taylor","Lil","Stewie"),
- array("mus2","King","Z","Osbourne","Springsteen","Gaga","Young","Beethoven","Sinatra","Jackson","McCartney","Cobain","Bieber","Hendrix","Dylan","Presley","Bowie","Dogg","Perry","Swift","Wayne","Wonder"),
- array("band1","The &plur |animal","Def |band2","Led |obj","The Rolling |band2","The |band2","|metal |band2","Radio && |bodypart","|drugs N' |drugs","|color Hot &plur |fruit","|color day","Van |band2","|color |band2","Sex &plur |band2"),
- array("band2","Leppard","Stones","Who","Sabbath","Maiden","Halen","Clash","Cure","Doors","Floyd","Pistol"),
- array("recipe","recipe of the day: |meal","|person teaches us how to cook |meal &!","recipe: |meal","Learn to cook delicious |meal &!"),
- array("meal","|food with |food","|food and |food","|foodAdj |food","|food filled with |food","|food with a side of |food","|food and |drugs"),
- array("food","|countrish |food2","|food2 && |food2","|objAdj |food2","|foodAdj |food2","|ingredient |food2","|foodAdj |ingredient |food2","|foodAdj |ingredient","|ingredient and |ingredient |food2"),
- array("ingredient","lamb","|animal","|drugs","|fruit","pork","bacon","potato","chicken","garlic","shrimp","mushroom","rice","spaghetti","spinach","beef","pepperoni","|bodypart","diet coke","cheeto","cheese","vodka","human flesh","salmon","ramen noodle","bratwurst","milk","jello","marmite","herring"),
- array("foodAdj","baked","slow cooked","savoury","classic","stuffed","grilled","smoked","BBQ","alcoholic","sweet","pickled"),
- array("food2","|fruit","steak","lasagna","cookies","bread","chili","liquor","soup","pie","stew","sauce","sausage","casserole","loaf","dressing","meatballs","roast","pot","wok","sushi","burrito","hamburger","pizza","feast","cider","paste","powder"),
- array("sickness","|si1 && |si2","|person &'s disease"),
- array("si1","neur","myos","arter","arthr","bronch","hepat","ovar","brain","|bodypart","thrombophleb","multiple scler","|drugs","lup"),
- array("si2","itis","otomia","osis","emia","ism"),
- array("event","race war","nuclear war","war in |country","world peace","handing out of free |drugs","judgement of god","shortage of |drugs","childrens crusade","financial crash","|obj shortage","proletarian revolution","civil war","disease and famine","whatever |person wants","|org -- |org merger","climate change","Jihad against |country","consequence","|location protest","golden age of prosperity","wedding","internet censorship","tsunami","shopping spree","public outrage","boring event nobody else cares about","|animal stampede","brexit"),
- array("boat","boat","camping trip","air plane","small cart","|objAdj |boat","roof","train","vacation to |country","|drugs","recent trip to |country","|countrish soil"),
- array("objAdj","worlds biggest","tiny","very rare","brand new","fire proof","valuable","&random adjsX","secret","long forgotten","dangerous","exploding","mysterious","extra-sloppy","dank","splendid","boorish","eerie","fascinating","otherwordly","common","woefully outdated","|metal","sweet","expensive designer","|country &'s first"),
- array("adj","European","sharia","republican","democrat","libertarian","tiny","&random adjsX","yuuge","funny","badass","cool","autistic","erotic","halal","vegan","magnificient","ancient","modern","|animal like","dank","boorish","sophisticated","brave","inexperienced","superficial","free","fat","wacky","teen","clown ass","well known"),
- array("nationObj","laws","exports","taxes","&plur &random nounsX","lawns","borders","government","nuclear arsenal","immigrants"),
- array("quote","|slogan","&plur &ucf |animal and &plur |animal &, |natures |duet","I |applaud |whatHappened $year","|grab |her by the |bodypart","|republicans are |too |strict about |racism","I |fondly remember the |event of $year","My |doctor tells me to |eat less |drugs","This is like the |event of $year &!","I did not have |sex with |person &!","&save3 |person is &an |adj &rhyme3 nouns2","|event will be &an |titanic |failure &!"),
- array("slogan","control our own &save |nationObj","kill the |republicans","make |country |great |again","Legalize |drugs &!","clean |location of |drugs &!","vote for |person &!","stop the |cruel treatment of &plur |animal &!"),
- array("location","Oregon","NY","Miami Beach","Vegas","neighbourhood","|country","Utah","Texas","small town","rural |country","area","Arkansas","Beverly Hills","Compton","New Jersey","small town","Aleppo","Kentucky","tianmen square","kremlin","nebraska","Beijing","inner city","Elon Musk's base on |planet","Mt Everest","JFK Airport","Yangtze River","California","Paris, Texas","Leicester","Dimension 7"),
- array("country","America","The United States of America","Canada","Sweden","Libya","Iraq","Syria","Afghanistan","Mexico","Turkmenistan","China","Chaiyna","Russia","The Soviet Union","Poland","North Korea","The Democratic Peoples Republic of Korea","|location","Ottoman Empire","|obj && land","Egypt","heaven","angola","Scotland","Cuba","Japan","Kosovo","Country where |event regularly happens","The land of the |adj &, the home of the |adj &, |country","the land of the |adj |obj","The Lone Star State of Texas","australia","the land down under","burma","The UK"),
- array("countrish","english","american","syrian","|location","european","chinese","mexican","north korean","libyan","canadian","cambodian","German","Scottish","Russian","Sudanese","cuban","australian"),
- array("org","ISIS","Democratic Party Establishment","GOP","United Nations","European Union","|country","Soviet Union","Taliban","Green Party","Vatican","Westboro Baptist Church","4chan","Communist International","|countrish National party","|obj lobby","the senate","United |obj Corporation Inc","wikileaks","NATO","Taliban Muhajideen","Russian Secret Service"),
- array("business","bakery shop","&random nounsX shop","Walmart","Mc Donalds","Casino","Abortion Clinic","Family Planning Center","Bank","|obj cafe"),
- array("racism","racism","excessive carbon emissions","terrorism","sponsoring |org","harboring |republicans","posession of |drugs","consensual sex","police violence","calling for |event","using the metric system","cat calling","abuse of |drugs","homosexuality","homophobia"),
- array("obj","cupcake","&random nounsX","marijuana cigarette","assault rifle","voice recording of |person","dick butt","dongle","stamp","house","|adj |obj","|objAdj |obj","|animal","bow and arrow","poop","ketchup","bag of |drugs","cool leather jacket","&random nounsX","samsung 7","|fruit","fresco","|countrish |obj","|boat","|box of packing peanuts","rug","|countrish flag","thermostat","mop","towel","twister mat","soy sauce packet","lamp shade","wagon","unicycle","button","fork","bread loaf","purse","currywurst","drill press","mop","blanket","credit card","sandal","candy wrapper","sailboat","deodorant","toe ring","stop sign","tire swing","coaster","blouse","bowl","garden gnome","beard","throne","abortion pill","|animal cage","sun","dreams","&save |obj &rhyme nouns2","rubber |animal","sand paper","lotion","rune stone","sarcophagus","screw","leg warmer","|magicItem","|meal"),
- array("drugs","drugs","&random nounsX","marijuana","cocaine","firearms","illegal chemicals","anthrax","plutonium","prescription drugs","&load","&plur |obj","condoms","saws","pesticides","GMO foods","vaccines","porn","sand","MDMA","MSG","greasy food","PCP","comic books","collagen","smallpox spores","&plur |fruit","tax returns","informational material from |org","|animal shit","|animal &plur |bodypart","life sustaining nutrition","&plur |fruit","black beauties","smart pills","bath salts","stardust","blow","meth","crank","speed","molly","moon rocks","love drugs","scooby snacks","smack","brown sugar","skunk","laughing gas","ketamine","acid","yellow sunshine","ganja","purple haze","magic mushrooms","shrooms","oxycotin","ritalin","diet coke","spice","black mamba","vicodin","xanax","angel dust","rocket fuel","mescaline","ether","coca cola","viagra","glue","jenkem","cognac","roses","marmite"),
- array("magicItem","|mItem1 |mItem2","|mItem1 |mItem2 of |mItem3"),
- array("mItem1","|objAdj","flaming","lazy","titanforged","wonderous","magical","dark","holy"),
- array("mItem2","bastard sword","katana","long bow","plate mail","hat","helmet","shield","gauntlet","ring","necklace","war axe"),
- array("mItem3","the |obj","flaming","dreaming","the |animal","ice","magic","death","love","|racism","|sickness","|mItem3 |mItem4"),
- array("mItem4","+1","+2","+7","that is cursed"),
- //links
- array("links","Videos","Politics","U.S.","Opinion","Business","Entertainment","Tech","Science","Health","Travel","Lifestyle","World","Radio","TV","|country","|event","|person","&random nounsX","|drugs","|obj news","|adj news","|racism","Gossip","Clickbait","|animal news","|sex","|location"),
- //title
- array("title","|t1 |t2","The |t1","The Daily |t1","The |location |t1"),
- array("t1","|animal","|person","|country","|countrish","|drugs","Gnerator","|org"),
- array("t2","News","Today","Journal","Post","Observer","Tribune","Herald","Bulletin","Weekly","Mirror"),
- array("breaking","breaking","this just in","breaking news","|event","good news","the |racism crisis"),
- );
- //image
- $imagesDir = 'images/';
- $images = glob($imagesDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);
- $randomImage = $images[array_rand($images)];
- $smallPics = array();
- for ($jj=0;$jj<10;$jj++){
- $smallPics[$jj]=$images[array_rand($images)];
- }
- $wimagesDir = 'weather/';
- $wimages = glob($wimagesDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);
- $randomwImage = $wimages[array_rand($wimages)];
- for ($i=1;$i<2;$i++){
- if (isset($_GET["debug"])){
- $peom=start_gnerat("debug_start");
- }else{
- $saves=start_gnerat("save");
- $peom=ucwords(start_gnerat("start"));
- $tmpRnd=rand(1,16);
- if ($tmpRnd==1){$peom="<font COLOR='#BC0000'>".strtoupper(start_gnerat("breaking")).": </font>".$peom;}
- }
- //print the site!
- if ($simpl==0) {
- //echo "<div class='header'><img class='logo' src='logo.png'></img>";
- echo "<div class='header'><a href='/news/'><h2 class='title'>".strtoupper(start_gnerat("title"))."</h2></a>";
- echo "<p class='links'>";
- echo "<a class='link' href='/news/'><b>Home</b></a>";
- $tmpNum=rand(4,10);
- for ($rr=0;$rr<$tmpNum;$rr++){
- echo "<a class='link' href='/news/'><b>".ucwords(start_gnerat("links"))."</b></a>";
- }
- echo "</p>";
- echo "</div>";
- echo "<div class='main'>";
- echo "<div class='page'>";
- echo "<h2><b>".$peom."<b></h2>";
- echo "<div><img class='image' src='".$randomImage."' width=397 height=270></img>";
- echo "<hr><ul class='smallText'>";
- for ($bb=0;$bb<5;$bb++){
- echo "<li><b>".ucwords(start_gnerat("start"))."</b></li>";
- }
- echo "</ul>";
- echo "</div>";
- echo "</div>";
- echo "<div class='rightPage'>";
- echo "<p class='rightTextLarge' align='right'><img class='wimg' src='".$randomwImage."'></img>".$cels."°C <font class='smallGreyText'>".ucwords(start_gnerat("location"))."</font></p>";
- echo "<hr><p class='rightTextLarge'>".ucwords(start_gnerat("adj"))." News:</p>";
- for ($oo=0;$oo<6;$oo++){
- echo "<div class='smallPic'><img src='".$smallPics[$oo]."' width=144 height=81></img>";
- echo "<p class='rightText'><b>".ucwords(start_gnerat("start"))."</b></p></div>";
- }
- echo "</div>";
- echo "</div>";
- }
- }
- //money
- function money($tmp)
- {
- if ($tmp<1000) {$tmp=round($tmp,-1);}
- if ($tmp>1000) {$tmp=round($tmp,-2);}
- if ($tmp>10000) {$tmp=round($tmp,-3);}
- if ($tmp>100000) {$tmp=round($tmp,-4);}
- if ($tmp>1000000) {$tmp=round($tmp,-5);}
- return $tmp;
- }
- //get a random month
- function get_month($tmp)
- {
- if ($tmp=1) {return "January";}
- if ($tmp=2) {return "February";}
- if ($tmp=3) {return "Mars";}
- if ($tmp=4) {return "April";}
- if ($tmp=5) {return "May";}
- if ($tmp=6) {return "June";}
- if ($tmp=7) {return "July";}
- if ($tmp=8) {return "August";}
- if ($tmp=9) {return "September";}
- if ($tmp=10) {return "October";}
- if ($tmp=11) {return "November";}
- if ($tmp=12) {return "December";}
- }
- //find a rhyme
- function rhyme($tmpString, $wordlist){
- global $conn;
- $num=3;
- $tmpEnd=substr($tmpString,-$num);
- if (strlen($tmpEnd)==2){
- $num=2;
- }
- //ix
- if ($tmpEnd=="six" || $tmpEnd=="ix"){$tmpEnd="iks";}
- //ead
- if ($tmpEnd=="ead"){
- $a=rand(1,4);
- if ($a==1){$tmpEnd="ed";$num=2;}
- if ($a==2){$tmpEnd="eed";$num=3;}
- }
- //eap
- if ($tmpEnd=="eap"){
- $a=rand(1,4);
- if ($a==1){$tmpEnd="ep";$num=2;}
- if ($a==2){$tmpEnd="eep";$num=3;}
- }
- //$sql="SELECT word FROM $wordlist WHERE RIGHT(word, $num) = '$tmpEnd' ORDER BY RAND() LIMIT 1";
- //$result = $conn->query($sql);
- //if ($result->num_rows > 0) {
- // $row = $result->fetch_array(MYSQLI_NUM);
- // return $row[0];
- //} else {
- //echo $sql."</br>";
- //echo "0 rows returned.";
- // return databaseWord($wordlist);
- //}
- return "wobl!"
- }
- //get random word
- function databaseWord($wordlist){
- global $conn;
- /*$sql="SELECT word FROM $wordlist ORDER BY RAND() LIMIT 1";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- $row = $result->fetch_array(MYSQLI_NUM);
- //verb?
- if ($wordlist=="verbs" || $wordlist=="verbs1" || $wordlist=="verbs2" || $wordlist=="verbs3" || $wordlist=="verbs4"){
- //check for ing
- $tmpEnd2=substr(strtolower($row[0]), -3);
- if ($tmpEnd2=="ing"){
- //print "</br>-- ".$row[0];
- $row[0]=databaseWord($wordlist);
- }
- //remove ed
- $tmpEnd=substr(strtolower($row[0]), -2);
- if ($tmpEnd=="ed"){
- $row[0]=substr($row[0],0,-2);
- }
- //remove s and return
- return remove_s($row[0]);
- //not verb
- }else{
- return $row[0];
- }
- } else {
- //echo $sql."</br>";
- //echo "0 rows returned.";
- return "fuck";
- }
- */
- return "RANDOM WORDL!"
- }
- //here we start to gnerat!
- function start_gnerat($start_point){
- global $gnerator_data;
- global $save_string;
- global $save_string2;
- global $save_string3;
- global $gnerator_save;
- global $gnerator_save2;
- global $gnerator_save3;
- global $ucf;
- global $an;
- global $plur;
- global $remS;
- global $fullname;
- $gnerator_result="";
- $explode_array=null;
- //find start point
- for ($i=0;$i<count($gnerator_data);$i++){
- if ($gnerator_data[$i][0]==$start_point){
- //explode it and loop it word for word
- $explode_array=explode(" ",$gnerator_data[$i][rand(1,count($gnerator_data[$i])-1)]);
- for ($z=0;$z<count($explode_array);$z++){
- //link links to somwhere!
- if (startsWith($explode_array[$z],"|")){
- $temp_word=str_replace("|","",$explode_array[$z]);
- $gnerator_result=$gnerator_result.start_gnerat($temp_word);
- }
- //random old age
- else if ($explode_array[$z]=="&old"){
- $gnerator_result=$gnerator_result.rand(50,115)." ";
- }
- //random percent
- else if ($explode_array[$z]=="&percent"){
- $gnerator_result=$gnerator_result.rand(0,100)." ";
- }
- //fullname
- else if ($explode_array[$z]=="&fullname"){
- $gnerator_result=$gnerator_result.$fullname." ";
- }
- //rhyme
- else if ($explode_array[$z]=="&rhyme" || $explode_array[$z]=="&rhyme2" || $explode_array[$z]=="&rhyme3"){
- //next part
- $wordlist=$explode_array[$z+1];
- $explode_array[$z+1]="";
- $rhyme1=rhyme($save_string,$wordlist);
- $rhyme2=rhyme($save_string2,$wordlist);
- $rhyme3=rhyme($save_string3,$wordlist);
- //an?
- if ($an==1){
- $an=0;
- if ($explode_array[$z]=="&rhyme"){$gnerator_result=$gnerator_result.get_pref($rhyme1)." ";}
- if ($explode_array[$z]=="&rhyme2"){$gnerator_result=$gnerator_result.get_pref($rhyme2)." ";}
- if ($explode_array[$z]=="&rhyme3"){$gnerator_result=$gnerator_result.get_pref($rhyme3)." ";}
- }
- //save?
- if ($gnerator_save==1){
- if ($explode_array[$z]=="&rhyme"){$save_string=$rhyme1;}
- if ($explode_array[$z]=="&rhyme2"){$save_string=$rhyme2;}
- if ($explode_array[$z]=="&rhyme3"){$save_string=$rhyme3;}
- $gnerator_save=0;
- }
- //save2?
- if ($gnerator_save2==1){
- if ($explode_array[$z]=="&rhyme"){$save_string2=$rhyme1;}
- if ($explode_array[$z]=="&rhyme2"){$save_string2=$rhyme2;}
- if ($explode_array[$z]=="&rhyme3"){$save_string2=$rhyme3;}
- $gnerator_save2=0;
- }
- //save3?
- if ($gnerator_save3==1){
- if ($explode_array[$z]=="&rhyme"){$save_string3=$rhyme1;}
- if ($explode_array[$z]=="&rhyme2"){$save_string3=$rhyme2;}
- if ($explode_array[$z]=="&rhyme3"){$save_string3=$rhyme3;}
- $gnerator_save3=0;
- }
- if ($explode_array[$z]=="&rhyme") {$gnerator_result=$gnerator_result.$rhyme1." ";}
- if ($explode_array[$z]=="&rhyme2") {$gnerator_result=$gnerator_result.$rhyme2." ";}
- if ($explode_array[$z]=="&rhyme3") {$gnerator_result=$gnerator_result.$rhyme3." ";}
- }
- //random
- else if ($explode_array[$z]=="&random"){
- //next part
- $wordlist=$explode_array[$z+1];
- $explode_array[$z+1]="";
- //nounsX
- if ($wordlist=="nounsX"){
- $tmpRnd=rand(1,3);
- $wordlist="nouns".$tmpRnd;
- }
- //adjsX
- if ($wordlist=="adjsX"){
- $tmpRnd=rand(1,3);
- $wordlist="adjs".$tmpRnd;
- }
- //verbsX
- if ($wordlist=="verbsX"){
- $tmpRnd=rand(1,3);
- $wordlist="verbs".$tmpRnd;
- }
- $tmpRandom=databaseWord($wordlist);
- //an?
- if ($an==1){
- $an=0;
- $gnerator_result=$gnerator_result.get_pref($tmpRandom)." ";
- }
- //plur?
- if ($plur==1){
- $plur=0;
- $tmpRandom=get_plur($tmpRandom);
- }
- //remS?
- if ($remS==1){
- $remS=0;
- $tmpRandom=remove_s($tmpRandom);
- }
- //save?
- if ($gnerator_save==1){
- $save_string=$tmpRandom;
- $gnerator_save=0;
- }
- //save2?
- if ($gnerator_save2==1){
- $save_string2=$tmpRandom;
- $gnerator_save2=0;
- }
- //save3?
- if ($gnerator_save3==1){
- $save_string3=$tmpRandom;
- $gnerator_save3=0;
- }
- //ucf?
- if ($ucf==1){
- $ucf=0;
- $tmpRandom=ucfirst($tmpRandom);
- }
- $gnerator_result=$gnerator_result.$tmpRandom." ";
- }
- //save
- else if ($explode_array[$z]=="&save"){
- $gnerator_save=1;
- }
- //load
- else if ($explode_array[$z]=="&load"){
- if ($an==1){
- $an=0;
- $gnerator_result=$gnerator_result.get_pref($save_string)." ";
- }
- if ($plur==1){
- $plur=0;
- $gnerator_result=$gnerator_result.get_plur($save_string)." ";
- }else{
- $gnerator_result=$gnerator_result.$save_string." ";
- }
- }
- //save2
- else if ($explode_array[$z]=="&save2"){
- $gnerator_save2=1;
- }
- //save3
- else if ($explode_array[$z]=="&save3"){
- $gnerator_save3=1;
- }
- //save2now
- else if ($explode_array[$z]=="&save2now"){
- $save_string2=$explode_array[$z+1];
- $explode_array[$z+1]="";
- $explode_array[$z]="";
- }
- //load2
- else if ($explode_array[$z]=="&load2"){
- if ($an==1){
- $an=0;
- $gnerator_result=$gnerator_result.get_pref($save_string2)." ";
- }
- if ($plur==1){
- $plur=0;
- $gnerator_result=$gnerator_result.get_plur($save_string2)." ";
- }else{
- $gnerator_result=$gnerator_result.$save_string2." ";
- }
- }
- //load3
- else if ($explode_array[$z]=="&load3"){
- if ($an==1){
- $an=0;
- $gnerator_result=$gnerator_result.get_pref($save_string3)." ";
- }
- if ($plur==1){
- $plur=0;
- $gnerator_result=$gnerator_result.get_plur($save_string3)." ";
- }else{
- $gnerator_result=$gnerator_result.$save_string3." ";
- }
- }
- //ucf
- else if ($explode_array[$z]=="&ucf"){
- $ucf=1;
- }
- //remS
- else if ($explode_array[$z]=="&remS"){
- $remS=1;
- }
- //an
- else if ($explode_array[$z]=="&an"){
- $an=1;
- }
- //plur
- else if ($explode_array[$z]=="&plur"){
- $plur=1;
- }
- //normal word just add to output
- else {
- //an?
- if ($an==1){
- $an=0;
- $gnerator_result=$gnerator_result.get_pref($explode_array[$z])." ";
- }
- //plur?
- if ($plur==1){
- $plur=0;
- $explode_array[$z]=get_plur($explode_array[$z]);
- }
- //remS?
- if ($remS==1){
- $remS=0;
- $explode_array[$z]=remove_s($explode_array[$z]);
- }
- //ucf?
- if ($ucf==1){
- $ucf=0;
- $gnerator_result=$gnerator_result.ucfirst($explode_array[$z])." ";
- }
- else{
- $gnerator_result=$gnerator_result.$explode_array[$z]." ";
- }
- //save?
- if ($gnerator_save==1){
- $save_string=$explode_array[$z];
- $gnerator_save=0;
- }
- //save2?
- if ($gnerator_save2==1){
- $save_string2=$explode_array[$z];
- $gnerator_save2=0;
- }
- //save3?
- if ($gnerator_save3==1){
- $save_string3=$explode_array[$z];
- $gnerator_save3=0;
- }
- }
- }
- }
- }
- $gnerator_result=str_replace(" &<","",$gnerator_result);
- $gnerator_result=str_replace(" &;",";",$gnerator_result);
- $gnerator_result=str_replace(" &?","?",$gnerator_result);
- $gnerator_result=str_replace(" &.",".",$gnerator_result);
- $gnerator_result=str_replace(" &,",",",$gnerator_result);
- $gnerator_result=str_replace(" &!","!",$gnerator_result);
- $gnerator_result=str_replace(" &'s","'s",$gnerator_result);
- $gnerator_result=str_replace(" &;",";",$gnerator_result);
- $gnerator_result=str_replace(" &:",":",$gnerator_result);
- $gnerator_result=str_replace(" &.",".",$gnerator_result);
- $gnerator_result=str_replace(" &!","!",$gnerator_result);
- $gnerator_result=str_replace(" &?","?",$gnerator_result);
- $gnerator_result=str_replace(" &,",",",$gnerator_result);
- $gnerator_result=str_replace(" &'s","'s",$gnerator_result);
- $gnerator_result=str_replace("&' "," '",$gnerator_result);
- $gnerator_result=str_replace(" '&","' ",$gnerator_result);
- $gnerator_result=str_replace("(& ","(",$gnerator_result);
- $gnerator_result=str_replace(" &)",")",$gnerator_result);
- $gnerator_result=str_replace(" && ","",$gnerator_result);
- $gnerator_result=str_replace(" && ","",$gnerator_result);
- $gnerator_result=str_replace(" -- ","-",$gnerator_result);
- $gnerator_result=str_replace("&tab","     ",$gnerator_result);
- return $gnerator_result;
- }
- //String Start/End char functions.
- function startsWith($haystack, $needle) {
- return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
- }
- function endsWith($haystack, $needle) {
- return $needle === "" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);
- }
- //a/an
- function get_pref($tmpTxt)
- {
- $tmpStart=substr(strtolower($tmpTxt),0,1);
- if ($tmpStart=="a" || $tmpStart=="e" || $tmpStart=="i" || $tmpStart=="o" || $tmpStart=="u" || $tmpStart=="y"){
- return "an";
- }else{
- return "a";
- }
- }
- //plural
- function get_plur($tmpTxt){
- $tmpEnd=substr(strtolower($tmpTxt), -1);
- if ($tmpEnd=="x" || $tmpEnd=="z" || $tmpEnd=="ch" || $tmpEnd=="sh"){
- return $tmpTxt."es";
- }else if ($tmpEnd=="y"){
- return substr($tmpTxt,0,-1)."ies";
- //ending with s just assume already plur and return.
- }else if ($tmpEnd=="s"){
- return $tmpTxt;
- }else{
- return $tmpTxt."s";
- }
- }
- //remove s
- function remove_s($tmpTxt){
- $tmpEnd=substr(strtolower($tmpTxt), -1);
- $tmpEnd2=substr(strtolower($tmpTxt), -3);
- if ($tmpEnd=="s"){
- return substr($tmpTxt,0,-1);
- }else{
- return $tmpTxt;
- }
- }
- $output_array=str_split($peom,99);
- $output_len=count($output_array);
- $text_speed=1; $a=rand(1,70); if ($a==1){$text_speed=0;}
- $text_pitch=0; $a=rand(1,70); if ($a==1){$text_pitch=2;}
- ?>
- <script>
- document.addEventListener("DOMContentLoaded", function(event) {
- msg = new SpeechSynthesisUtterance();
- voices = window.speechSynthesis.getVoices();
- setTimeout(function () {
- msg.voice = voices[<?php echo rand(1,10);?>]; // Note: some voices don't support altering params
- msg.voiceURI = 'native';
- msg.volume = 1; // 0 to 1
- msg.rate = <?php echo $text_speed;?>; // 0.1 to 10
- msg.pitch = <?php echo $text_pitch;?>; //0 to 2
- msg.lang = 'en-US';
- messages = [<?php for ($i=0;$i<$output_len;$i++){echo '"'.$output_array[$i].'"'; if ($i<$output_len-1){echo ',';} }?>];
- var messageNumber = 0;
- msg.text = messages[messageNumber];
- msg.onend = function(e) {
- console.log('Finished in ' + event.elapsedTime + ' seconds.');
- messageNumber = messageNumber + 1;
- msg.text = messages[messageNumber];
- msg.voice = voices[<?php echo rand(1,10);?>]; // Note: some voices don't support altering params
- msg.voiceURI = 'native';
- msg.rate = <?php echo $text_speed;?>; // 0.1 to 10
- msg.pitch = <?php echo $text_pitch;?>; //0 to 2
- msg.lang = 'en-US';
- msg.volume = 1; // 0 to 1
- if (msg.text=="pause") {
- msg.volume = 0;
- } else {
- }
- if (messageNumber < messages.length) {
- speechSynthesis.speak(msg);
- }
- };
- //speechSynthesis.speak(msg);
- }, 1000);
- });
- </script>
- </body>
- <html>
Add Comment
Please, Sign In to add comment