I am building a spider that will crawl through random whitepages (eg. anywho.com, switchboard.com, whitepages.com, etc..) and collect the information on the people found there and throw it into a database. So far I've only made this little prototype, however after trying to run it I've run into a bunch of problems....a lot of them I fixed but there are some with the expressions that I can't figure out.
Here are the errors:
QuoteWarning: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 57 in /home/public_html/spider/inc/anywho.class.php on line 51
Warning: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash in /home/public_html/spider/inc/anywho.class.php on line 72
Warning: preg_match_all() [function.preg-match-all]: No ending delimiter '^' found in /home/public_html/spider/inc/anywho.class.php on line 73
Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in /home/public_html/spider/inc/anywho.class.php on line 76
Warning: preg_replace() [function.preg-replace]: No ending delimiter '.' found in /home/public_html/spider/inc/anywho.class.php on line 92
Warning: preg_replace() [function.preg-replace]: No ending delimiter '^' found in /home/public_html/spider/inc/anywho.class.php on line 93
Warning: preg_replace() [function.preg-replace]: No ending delimiter '.' found in /home/public_html/spider/inc/anywho.class.php on line 94
Warning: preg_replace() [function.preg-replace]: No ending delimiter '^' found in /home/public_html/spider/inc/anywho.class.php on line 95
Warning: preg_replace() [function.preg-replace]: No ending delimiter '*' found in /home/public_html/spider/inc/anywho.class.php on line 96
Along with these it isn't printing out the info like it is suppose to on line 56 of anywho.class.php
As to the fact that these are two files and a little bigger then the normal "snippet" I posted them both in a pin board. The links are below.
Spider Class: http://www.coderprofile.com/networks/code-pin-board/258/spiderclassphp
Anywho Class: http://www.coderprofile.com/networks/code-pin-board/257/anywhospiderclassphp
And here is the source of the form page:
Code: <?php
require("spider.class.php");
require("anywho.class.php");
$spider=new spider("Lorem Ipsum","Lorem Ipsum","Lorem Ipsum","localhost",15);
$any=new anywho;
if(isset($_POST['submit'])){
$state=$_POST['state'];
$last=$_POST['last'];
$first = (isset($_POST['first'])) ? $_POST['first'] : null;
$street = (isset($_POST['street'])) ? $_POST['street'] : null;
$zip = (isset($_POST['zip'])) ? $_POST['zip'] : null;
$any->initialize($last,$state,$first,$street,$city,$zip);
$any->any_crawl($any->url,0,1);
}
?>
<form action="index.php" method="post">
Last Name: <input type="text" name="last">*
First Name: <input type="text" name="first">
Street: <input type="text" name="street">
Zip: <input type="text" name="zip">
State:
<select name="state" style="height:17px; font-size:9px;">
<option value="">Select a State</option>
<option value="AL" selected="selected" >Alabama</option>
...........................
...........................
<option value="WY">Wyoming</option>
</select>*
<input type="submit" value="Crawl" name="submit">
</form>
I'm really sorry about the messy code and poor documentation.
Also I really appreciate any and all replies!
Comparing Values
HiI'm reading data from a database and this seems to work OK.Each system has an associated series of references..Code:Code: $dn = "cn=System"; $filter="(objectclass=*)";
need help modifying script
Hi guys,I'm fairly new to php and am having a bit of trouble modifying a script.This is the script:Code: <?php##############################################################################
styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those. I have the relevent html but not able to come up with the css. please helpthxview plaincopy to
HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc send and then the table belpw only Job location sends and the other columns do not send. is this a html
Navigation include for all site directories
Hi,I need a navigation include that can deal with directories at different levels on a site. All I can seem to find are the basic includes for files all in the same directory. This doesn't work for me
duplicate record notification
In my database, after insertion of records, I want to know if the record inserted is duplicate or not. How can I do this ??
$variable = $variable
HelloSorry if this is a really simple question but I have run out of ideas. Is there a really simple way of doing the following:$animal_dog = $something_something[$i]['animal_dog'];$animal_cat =
DYNPRO_FIELD_CONVERSION
Hi gurus,
help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me push in the right direction?
PHP Upload issue
Hi guys,I have stumble across an interesting issue with my script and is doing my head in.A little background on the application.I've got a document repository site which uses Jupload to upload