Obtain the background code of the joke set website joke data and the background code of the joke

Source: Internet
Author: User

Obtain the background code of the joke set website joke data and the background code of the joke

Recently, an app is used to obtain the data of a joke set website for convenient development. I used PHP to pre-process the data.

The Code is as follows:

 

<? Phpinclude_once ("writeLog. php "); class Joke {var $ jokeText =" "; var $ urlNext =" "; var $ urlPrv =" "; var $ urlBase =" http://wap.jokeji.cn /"; function _ construct () {} function getContent ($ url) {MyLog ("url. log ", $ url); $ html = file_get_contents (iconv (" gb2312 "," UTF-8 ", $ url); $ begin = stripos ($ html, "<div class = \" joketxt \ ">") + 23; $ end = stripos ($ html, "<script", $ begin ); $ r = substr ($ html, $ begin, $ end-$ begin); $ R = str_ireplace ("<p>", "", $ r); $ r = str_ireplace ("</p>", "", $ r ); $ r = str_ireplace ("<br>", "\ r \ n", $ r); $ this-> jokeText = $ r; $ begin = stripos ($ html, "previous: <a"); if ($ begin! = False) {$ begin + = 27; $ end = stripos ($ html, "\" ", $ begin); $ this-> urlNext = substr ($ html, $ begin, $ end-$ begin);} $ begin = stripos ($ html, "next article: <a"); if ($ begin! = False) {$ begin = $ begin + 27; $ end = stripos ($ html, "\" ", $ begin); $ this-> urlPrv = substr ($ html, $ begin, $ end-$ begin) ;}} function getFirstLink () {$ html = file_get_contents ($ this-> urlBase); $ begin = stripos ($ html, "<div class = \" list \ ">") + 42; $ end = stripos ($ html, "\" ", $ begin ); $ r = substr ($ html, $ begin, $ end-$ begin); return $ r;} function getJoke ($ u) {if ($ u = "") {$ url = $ this-> urlBase. $ this-> getFirstLink ();} else {$ url = $ this-> urlBase. urlencode ($ u) ;}$ this-> getContent ($ url); $ joke = array (); $ joke ["content"] = $ this-> jokeText; $ joke ["next"] = $ this-> urlNext; $ joke ["previous"] = $ this-> urlPrv; return $ joke ;}}

How to get the 360 homepage joke code

1. One BEAR comes over/comes back (with BEAR)
2. 11th books/incredible (BOOK11)
4. Xiaoyu told James that her father is incompetent and she cannot stop (she can't)
5. The goat stops breathing/raised its eyebrows (the goat does not breathe)
6. The mobile phone cannot fall into the toilet/the camera cannot be lost (wet)
7. When a dog passes the zhuqiao road, it will not be called)
8. The bee stops on the calendar/wind and sun (Bee and calendar)
10. Painters like to draw thick ropes, but do not like to draw fine ropes/superb ropes)
13. There were ten sheep, nine of them crouching in the sheepfold, one crouching in the pigsty/swaying (a sheep crouching wrong)
14. When Yang calls the e, The e calls and says "Hello"/yang fengyin (Yang PHONE Ying "hello ")
15. When the hat is dirty, you need to turn it over and then wear it)
16. Ten men watching five women take a bath.
17. Who has no phone number? /Tian Yi (Tian Yi seamless phone)
18. Who knows birds best? /Treasure
22. How to Make the sparrow quiet? /Press it)
23. Which snake has many mouths? /Snake)
25. What medicine is not poisonous? /Yam
26. Why is "7 UP/8 down"/7 above 8? Because eight is under seven.
27. Which kind of snake has the strongest vitality? /Three-inch tongue (snake)
28. Why is there only one tip of the iceberg? /Another corner was broken by the titani.

We recommend several websites that tell jokes.

Joke...
Well, I think so too. Well, you should check the sketch or listen to the broadcast first.
Ha, my space is full of jokes. Let's take a look.
More in space, haha.
1. When I waited for a bus, I drove a BMW. A tall man next to him said to the people around him: "Look, the old car was IBM ."

2. A friend of mine has an internship at China Unicom. One day, an old man approached me and said, "Give me a mobile card, OK ?" Then, if my friend's head was not lifted, he would say, "Master, someone is here !"

3. My colleagues may be nervous when they go to the customer. The first remark is: "Hello, Mr. Liu. What's your surname ?" Khan.

4. In the past, a geography teacher was a man. He was particularly violent. When he spoke or went up, he gave a fist, but he didn't beat a girl. A new girl did not know that she thought she was equal to men and women, on one occasion, she stole a cartoon in class and was found by a geography teacher. She came to her and said nothing. The girl looked pale and shouted: not a gift. Our geography teacher, waterfall Khan.

5. My classmates said: I put too much washing powder. Another question: What? Your brother has too many women?

6. One day, the bicycle fell into a row, and I only heard a classmate help the car and said, "Who's the Mercedes-Benz pressed my BMW?

7. I used to call my boyfriend in their dormitory, but he didn't answer the call. I was a little embarrassed. I made up a name and said, "Is XX there ?" It's time to pretend to be the wrong person ~~ The other party hesitated and said, "Wait, I'll give it to you. I was dizzy! The phone was suddenly suspended. Later, I asked my boyfriend about the name of a boy in the opposite dormitory.

8. The last time I saw a handsome guy selling cakes on the street outside China, my friend and I bought and said that he was like a cat king. When he heard that we were talking about him, he asked us what we said, I thought for a long time: "kingofmiaomiao (Meow )."

9. My dormitory girl talked to a netizen and said, "Hello, I'm Wang xiaoliang. Guess who I am? Fainting ......

10. I learned one sentence from a friend: give you ten words-how far is his mother and how far is his mother. I remember the first time he said this to a group of us, he saw that all of us were directed at dozens of words ......, Even better, I said this to n of my friends, who would hesitate for a moment for more than 90% of the time, silently reading or slightly moving their fingers, and then say with a smile, rely on, it's actually 10 characters. It's hard to try again and again!
(It's cool. It's winter, it's harmful ....)

One day, eggplant was walking in the street and suddenly sneezed. It wiped its nose and said angrily, "No! Another group photo is taken! "

There are 30 frogs in a pool, so they wear pants. Why? (He takes a bath !)

There was a pig. It went and went to the UK. What did it turn? ---- Pig.

The class teacher carried back the text, pig, puppy, and kitten all raised their hands. Who will the teacher call? -- Dog, because Wangwang Xianbei.

Butterfly, ant, spider, and, who worked together did not receive any compensation? -- Because the reactive power is unacceptable.

The elephant has the longest nose in the zoo. Who is the second longest? -- Elephant.

What kind of fruit has the worst eyesight? -- Mango.

Which two fruits have mobile phones? -- Radish and vegetables, each with soio.

If there is a car, the driver is the prince, and the passenger is the princess, who is the car? -- If

Who has a long leg? ---- Ham sausage

The eye-catching snake and the elephant have a date. After a cold greeting, they said, "Come on, and hold such a big pig. You're welcome. "

I think, as long as I have some modest qualities, I am a perfect person.

One day, mung bean broke up with her girlfriend. He was so sad that he kept crying and crying .~~~

Two jellyfish collided at the beach. Jellyfish A: "What are you doing! You cannot swim long eyes !」 Jellyfish B: "What is eye ?」 Jellyfish A: "I don't know. He scolded me like this when I hit someone else .」 Jellyfish B: "Oh! Yes !」

In the elementary school natural course, the teacher told us that there would be a knee jump reflection if we had a pat on our knees. When I got home, I took a hammer in my dad's lap and hammers it. As a result, my dad stood up and kicked me. It turns out that the teacher is right!

Assume that one day I have... the remaining full text>

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.