Random Pseudo-original description on zencart

Source: Internet
Author: User

The product description is composed of three texts, each of which is composed of ten words, these 10 words are derived from the TBS original dictionary tool. Therefore, each time you see the text, it will be different, let alone three paragraphs. Long-tailed words can also be added to the words in the text, and the famous text is inserted.


The Code is as follows: test. php


<? Php


$ Conn = @ mysql_connect ("localhost", "root", "") or die ("Contect Error! ");

Mysql_select_db ("test", $ conn );


$ A = rand (1, 3 );

$ B = rand (1, 3 );

$ C = rand (1, 3 );

$ D = rand (1, 3 );

$ E = rand (1, 3 );


$ Sql1 = "SELECT tou FROM 'test10' WHERE id = $ ";

$ Sql2 = "SELECT zhong FROM 'test10' WHERE id = $ B ";

$ Sql3 = "SELECT jiao FROM 'test10' WHERE id = $ c ";



$ Query1 = mysql_query ($ sql1, $ conn );

$ Query2 = mysql_query ($ sql2, $ conn );

$ Query3 = mysql_query ($ sql3, $ conn );



$ Row1 = mysql_fetch_array ($ query1 );

$ Row2 = mysql_fetch_array ($ query2 );

$ Row3 = mysql_fetch_array ($ query3 );



$ Bb1 = explode ("{", $ row1 ['tou']);


For ($ I = 0; $ I <= 100; $ I ++ ){

$ PC3 = explode ("|", $ bb1 [$ I]);

$ Zj = count ($ PC3)-1;

$ Dd1 = rand (0, $ zj );

$ Ee1 = $ PC3 [$ dd1];

$ Ff1. = "";

$ Ff1. = $ ee1;

}



$ Bb2 = explode ("{", $ row2 ['zhong']);


For ($ I = 0; $ I <= 100; $ I ++ ){

$ Cc2 = explode ("|", $ bb2 [$ I]);

$ Zj = count ($ PC3)-1;

$ Dd2 = rand (0, $ zj );

$ Ee2 = $ cc2 [$ dd2];

$ Ff2. = "";

$ Ff2. = $ ee2;

}


$ Bb3 = explode ("{", $ row3 ['jiao']);


For ($ I = 0; $ I <= 100; $ I ++ ){

$ Cc3 = explode ("|", $ bb3 [$ I]);

$ Zj = count ($ PC3)-1;

$ Dd3 = rand (0, $ zj );

$ Ee3 = $ cc3 [$ dd3];

$ Ff3. = "";

$ Ff3. = $ ee3;

}


$ Mode1 = "/}/";

$ Mode2 = "/{/";

$ Mode3 = "/###/";


$ X1 = '';

$ X2 = '';

$ X3 = '<strong>'. $ products_name. '</strong> ';

Echo $ x3;


$ Ff1 = preg_replace ($ mode1, $ x1, $ ff1 );

$ Ff1 = preg_replace ($ mode2, $ x2, $ ff1 );

$ Ff1 = preg_replace ($ mode3, $ x3, $ ff1 );


$ Ff2 = preg_replace ($ mode1, $ x1, $ ff2 );

$ Ff2 = preg_replace ($ mode2, $ x2, $ ff2 );

$ Ff2 = preg_replace ($ mode3, $ x3, $ ff2 );


$ Ff3 = preg_replace ($ mode1, $ x1, $ ff3 );

$ Ff3 = preg_replace ($ mode2, $ x2, $ ff3 );

$ Ff3 = preg_replace ($ mode3, $ x3, $ ff3 );



$ N = '(1 )'. $ ff1 .'. '. '<br> '. '(2 )'. $ ff2 .'. '. '<br> '. '(3 )'. $ ff3 .'. ';


Echo $ n;


?>


The database code is:


--

-- Table structure 'test4'

--


Create table if not exists 'test4 '(

'Id' int (5) not null,

'Page1 'text not null,

'Page2' text not null,

'Page3 'text not null,

'Page6 'varchar (20) NOT NULL

) ENGINE = InnoDB default charset = latin1;


--

-- Store the data in the table 'test4'

--


Insert into 'test4' ('id', 'page1 ', 'page2', 'page3', 'page6 ') VALUES

(1, 'not only are they great on the bike, but very relaxing around the campsite and walking around town. ', 'These sunglasses are awesome! They wrap around und your face just enough to provide side-sun protection and at the same time, do not look bulky. gglad I have them. ',' I thought it wocould be nice and with casing as they mention that casing type: soft type. but when receive item, it didnt come with casing. this sunglasses like a toy. ', 'hangout '),

(2, 'Very good. Had absolutely no problems with the order and it was delivered Very promptly. Love my Oakleys! ', 'My son asked for these for Christmas, when he opened them all his brothers wanted a pair too! They look great and are reasonably priced for the type of sunglasses they are. ',' Love the glasses. light and they fit to perfection. great buying experience all around. ', 'leona Collins '),

(3, 'very nice pair of sunglasses for shade/sun hiking or biking, driving or looking cool outside. clarity of vision with these are outstanding, construction is good. ',' I was a Ray Ban guy but I like Oakleys better. great quality glas, wocould buy again. ',' Excellent glasses. comfortable, light-weight and they help me look good. ', 'chow '),

(4, 'Love these glasses and all the various lenses available depending on your needs. highly recommend them. ', 'Great glasses, not too dark and they don't fall off your head and hat! This is my second pair and it's great to be able to switch out lens ''', 'My son asked for these for Christmas, when he opened them all his brothers wanted a pair too! They look great and are reasonably priced for the type of sunglasses they are. ', 'Barbara Jean Griffin '),

(5, 'I like the way they fit by clinging to your head. they are lightweight and comfortable as well. they are stylish and perform well at blocking the sun from your eyes. the frames are durable. ',' so I bought these bout a month ago, great glas! Very clear lenses and very wide view. ', 'this sunglasses is BOLD as hell and looks very cool! ', 'Ihammad '),

(6, 'two thumbs up to the seller !! ',' This is one of the sunglasses I like the most, they are very comfortable and durable, I recommend this a lot! ', 'These glasses are great. they are very lightweight and durable. I am in the middle East right now and they have held up nicely in the heat and dry conditions. ', 'Pedro ramirez '),

(7, 'I have Ed the parcel earlier than I thought, not just that, I Have ed it in a great perfect condition. ', 'These are very nice sunglasses, they are my first pair of polarized glasses and I am very pleased with them. ',' I love these sunglasses !! My first pair were stolen, so I got another pair. ', 'K. benson '),

(8, 'I had these glasses before and they were stollen out of my car. I am repurchasing them becuase they were so nice. they were light weight and were a good size, not too bulky but not tiny. ', 'pleased with the glasses but they are definitely for a small face. after reading reviews I took this into consideration and am very gglad I did. reviews do help. ', 'the lens are very good and definitely take The brightness out of the sun but still have good visibility. ', 'Tim mcalpine '),

(9, 'My husband really loves these Oakleys and he had to have a pair because My son has them. ', 'the Half Jackets were a great choice for me. I really love how they feel when I put them on because they fit perfectly! They also look really good on me and are stylish. ', 'the glaswere beautiful, The customer service was very useful.', 'schanen '),

(10, 'bought for 17 year old who likes designer stuff. he is very happy with them. ', 'thine' re light weight, yet very sturdy. they also always seem to sit right and feel comfortable. I use them not only for driving, but bike riding and hanging out at the beach. ',' I had always wanted to own a pair of Oakley Sunglasses, these are my first ones and I love them. ', 'geoff ');




This article is from the "e-commerce solutions" blog, please be sure to keep this source http://wmrwx.blog.51cto.com/1418507/1300615

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.