$cn = mysql_connect("localhost","user","pass");
mysql_select_db("blather");
function substrpos($str,$start,$end)
{
$startPos = strpos($str,$start)+strlen($start);
$endPos = strpos($str,$end)-$startPos;
return substr($str, $startPos,$endPos);
}
?>
The Blatherskite Directory - blue
|
 |
|
|
the_blatherskite_directory
if(empty($_GET['list']))
{
$lines = @file("http://blather.newdream.net/cgi-bin/blather?random");
$page_name = str_replace("'","_",strip_tags($lines[25]));
?>
searching =$page_name?>
|
|
|
... |
|
|
New Skites:
|
if(is_array($lines))
{
$found = false;
foreach($lines as $line)
{
if(strpos($line,"who;name=")!==false)
{
// deal with 'no email address' names
$name = substrpos($line,"who;name=","\" class=\"noline\">");
// deal with 'email address' names
$name2 = substr($name,0,strpos($name,";email="));
$detectedName = (empty($name2)) ? $name : $name2;
$sql = "INSERT INTO blatherskites (name) VALUES('".$detectedName."')";
if(@mysql_query($sql,$cn))
{
$found = true;
?>=htmlspecialchars(urldecode($detectedName))?>
}
}
}
if(!$found)
{
?>no-one new here.
}
}
?>
|
|
|
... |
|
} else {
?>
-full list
|
|
... |
|
|
All Known Skites:
|
$sql = "SELECT * FROM blatherskites ORDER BY name";
$result = mysql_query($sql,$cn);
echo "Blue skites collected so far: ".mysql_num_rows($result)."
";
while($row = mysql_fetch_assoc($result))
{
echo "\n".htmlspecialchars(urldecode($row['name']))." ";
}
?>
|
050308
|
|
... |
|
}
?>
|
Click here
|
for another page
|
050308
|
|
... |
|
|
Click here
|
to see everyone
|
050308
|
|
... |
|
|
what's it to you?
who
go
|
blather
from
|
|