...

View Full Version : Search and Find Help



damianej
11-09-2006, 04:18 AM
I am creating a directory for my website and need some help verifying links on other websites prior to adding them to my directory.
On my page, I ask that my link is uploaded to their page prior to me uploading theirs to mine. Once they upload my link, fill out the form, and press the submit button on the form I would like the submit button action to scan the particular page they said my link was on and verify it is their before I am ever notified that they have requested to be included in my directory.
Also I am using Dreamweaver 8 if that simplifies it.
Thank you for your help!!

ess
11-09-2006, 11:36 AM
You should have at the least provided some code so that it is easier to help you out.

Anyway...here is one way to do this.


<?php
// define the url that you want to check here
$url = "http://add_url_here.com";
// get the contents of that your url
$contents = file_get_contents( $url );

// search the contents of the user and check if your url has been added
// I am not too sure about the regular expression...because you didn't say much
// about yoru website....so...you are on your own with this.
if( !preg_match('/^(http|https|ftp):\/\/your_url_here.com?\//i', $contents, $result ) )
{
echo "Your website has not been added";
}
else
{
echo "Yes, it has been added ;)";
print_r( $result );
}

?>

good luck
:thumbsup:

damianej
11-09-2006, 07:07 PM
Sorry for not including the coding on my page, building an informational website is not a problem but incorporating these different behaviors is all new. The page address is
http://www.funtimespartyrental.com/FunTimes-addURL1.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum