Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    This is going to sound like a strange request, but I have a reason for it.

    I'm looking for a search engine that will allow me to search for a particular piece of HTML code and return the results, ideally in an XML format (although I'm not picky as long as the formatting is consistent). Has anyone seen anything like this?

    And no, Google and BingHoo! don't seem to have anything in that regard.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  2.  

  3. #2
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    try this funky piece of crap:
    http://www.wolframalpha.com/
    TheGAME1264 likes this.

  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    http://www.wolframalpha.com/input/?i=%3Ctd%3E

    Nope...but thanks, anyway. At least you tried. Can't ask more than that out of someone.
    shovenose likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    No problem. It was the wierdest search engine I could think of.
    Of course, you could always try the Google custom search on my site, and maybe you might get lucky with one of those ads?

  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Here's something I found that may work - a PHP solution that will find and replace the string you provide. Alternatively, you can just obtain files that have been modified.

    $dir = '/your_dir/';
    $searchstring = 'your search string here'

    $iterator = [COLOR=rgb(0, 0, 139)]new[/COLOR][COLOR=rgb(43, 145, 175)]RecursiveDirectoryIterator[/COLOR]($dir);

    [COLOR=rgb(0, 0, 139)]foreach[/COLOR] ([COLOR=rgb(0, 0, 139)]new[/COLOR][COLOR=rgb(43, 145, 175)]RecursiveIteratorIterator[/COLOR]($iterator) [COLOR=rgb(0, 0, 139)]as[/COLOR] $filename => $cur)
    {
    // Search and replace

    $contents = file_get_contents($filename);
    $contents = str_replace($searchstring, ' ', $content);
    file_put_contents($filename, $contents);

    // Alternatively, you can do this (instead of search and replace)

    [COLOR=rgb(0, 0, 139)]if[/COLOR](strpos($contents, $searchstring) !== [COLOR=rgb(0, 0, 139)]false[/COLOR])
    {
    $findcode[] = $filename; // gives you an array that gives you paths to files that contain the code you're looking for.
    }
    }
    You can run the script either from browser or command line.
    There's no undo function in the above, but adding an undo function wouldn't be that hard. Simply writing a filename.php.bck with the contents you got before replacing all.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  7. #6
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Trying to find a code snippet within your own code, or the net in general?
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  8. #7
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    I guess I assumed it was in hos own code - I should know better than to make assumptions when it come to Game -
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  9. #8
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Net in general, Wired.

    Searching my own code is not an issue. I can build a regex to do that.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:12 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com