PhpRiot

Listing 1414

Followup to listing-1413.php, submitted by andrew.

Submitted by Andrew, 29 June 2008
 
if(!isset($_POST['submit'])) {
// Form
?>
<form method="post">
URL: <input type="text" name="url"><br /><i>E.g. http://atlanta.craigslist.org/search/boa?query=jon+boat&minAsk=min&maxAsk=max</i><br />
<input type="submit" name="submit" value="Grab!">
</form>
<?
} else {
// Emails
 
$content=file_get_contents($_POST['url']);
 
preg_match_all("/\/(\w+)\/(d+)\.html\b/", $content, $matches, PREG_SET_ORDER);
 
echo $matches[0][0];
 
 
 
}
Submit a Follow Up