Wednesday, August 11, 2004

I had a hell of a time getting that freakin Earthlink cable modem to work with my Redhat 8.0 box. I finally said forget it and decided to get the router up and running instead of messin with that box. I was going to run smoothwall 2.0 but due to networking issues that I had not resolved I couldnt get the .iso to the right machine. So I went with Coyote Linux, I've used it before so I pretty much knew what to expect. I used the windows disk creator and after I made the disk and brought the box up I still couldnt get a valid IP. So I tried all types of stuff to get it working... I copied all the IP information that it had when under windows and typed it into the config... that didnt work. Finally it came down to me just rebooting the modem and bam!!! its up. I have 2 other computers up and on the net as well, I even have my packet 8 phone working too.

Monday, August 02, 2004

Well here's what I learned from my first little experience with PHP & libcurl .....

base href="http://www.mctreas.org/"
// ACCESS DAYTON PUBLIC RECORDS SITE
$url = "http://www.mctreas.org/Message_IsProcessing.cfm";
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
// times out after 4s
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS,
"streetnbr=1673&streetname=
earlham%20&own1=&parid=&taxyr=2003");
// add post fields

$result = curl_exec($ch); // run the whole process
print_r(curl_getinfo($ch));
echo "\n\ncURL error number:" .curl_errno($ch);
echo "\n\ncURL error:" . curl_error($ch);

curl_close($ch);
print $result;
?>



This little code right here did a basic post to a website and printed out the results from it or really gave me the page that it redirects to. It's the first step along this road and its a very good one. Oh, and to display code in a blog just take out a "<" and replace it with & l t ; Just smush it back together when you do.


Thursday, July 29, 2004

I'll try to keep my more technical posts over here on TechLife & leave Mindstates for what's going on in my head. I think the first problem I need to try and tackle is with page scraping. I need to access this public records site but I need to fill out a form first to get the information I want. I know page scraping is the way to go, I just need to learn more about it. When I get through and get it working I'll post up any working code that I have.