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 Coder
    Join Date
    Oct 2008
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy reading a file for position to save to var

    In need of a great deal of help What I'm aiming to do is search a webpages source code for a certain ID string, save it to a variable, and submit it to a form elsewhere. I know this would involve finding the strings position of course, but beyond this I really do not have enough experience with PHP to accomplish it. I have been building some utilities for use on our intranet at work and this would make a great deal of difference if I can accomplish it.

    For an example say the webpage in question was http://www.realtor.com/search/listin...mlslid=3026985 or any other get return result for that matter.

    what I need to save to a variable and submit as another get name is ' "Id":22249792, ' from <div class="listingData"> the '22249792' being what I need to read, identify and save to a variable. Regardless of if its a 5 digit or 15 digit number, I need anything between :, after "Id".

    There are additional "Id"s through out each file, but this is always uniquely the first so I'm thinking establishing that as a constant position would be the starting point here.. again I am not experienced in PHP, not to this point of troubleshooting at least all help is greatly appreciated.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    If you google "screenscraping", you will find scripts that do this sort of thing.

  • #3
    New Coder
    Join Date
    Oct 2008
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    thank you, I'll research this a bit


  •  

    Posting Permissions

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