Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Search and Find Help

    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!!

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    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 Code:
    <?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

  • #3
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •