Change My Listing
--#--
Now that we've got our IP address handy and ready to use, we need to
go stick it someplace. Before we can do that, though, we need some
reconnaissance. What does TSX expect to receive from the browser in
order to update my record?
If we download the TSX "update"
page, we'll see that it contains
an HTML form whose action is a Cold Fusion script named, appropriately
enough, "update.cfm?Code=Process." Don't worry about the fact that it's a
Cold Fusion template -- it works just like a CGI program.
A few things to note here: When you first arrived at the site, TSX presented
a form already filled in with your chosen host name. It derived that from
a cookie dropped on you the last time you visited.
Once past the password screen, an activation screen is already filled
in with your IP address, name and your email address. The IP address
was obtained from the HTTP header sent by your browser, but your name
and email address are in neither the HTTP header nor in the cookie
from an earlier session. TSX is apparently storing those in an
internal database.
Well, never mind those issues for now. When your robot comes back, it
won't be carrying a cookie (because it accepts none), and it will be
going straight to the Code=Process part of the CF template. So it needs
to take all relevant information in one package and deliver it all at once.
That includes the hidden fields you see in the TSX form. I have no idea
why the TSX coders are sending themselves a field named "URL_required" with
a value of "Please enter the URL." But I'm going to include it, because,
well, because you never know ... (You can try leaving it out and seeing if
you can still update your TSX record.)
So, based on my reconnaissance of the TSX update page, I'm adding the
following lines of code to my robot (I'm using phony data because I
don't want the renegades among you innocents abusing my TSX records):
$request =
POST $process, ["HostName" => "futility",
"URL_required" => "Please enter the URL",
"Password_required" => "Please enter your Password",
"Owner_required" => "Please enter the Owner's Name",
"Email_required" => "Please enter email address",
"URL" => "http://$ip",
"Owner" => "John Byrd",
"Email" => "myself\@someisp.com",
"Password" => "77xP0Z1",
"Popup" => "0",
"Adult" => "0",
"Title" => "",
"Keywords" => "",
"Description" => "",
"HomePage" => "http://"];