4 * Send purge requests for listed pages to squid
7 require_once( "commandLine.inc" );
9 $stdin = fopen( "php://stdin", "rt" );
12 while( !feof( $stdin ) ) {
13 $page = trim( fgets( $stdin ) );
14 if ( substr( $page, 0, 7 ) == 'http://' ) {
16 } elseif( $page !== '' ) {
17 $title = Title
::newFromText( $page );
19 $url = $title->getFullUrl();
23 echo "(Invalid title '$page')\n";
28 echo "Purging " . count( $urls ) . " urls...\n";
29 $u = new SquidUpdate( $urls );