Jump to content

Agrajag

Members
  • Posts

    3
  • Joined

  • Last visited

Agrajag's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Jessica, I don't understand the "right" way at all based on the docs I looked at. I'd like to get an understanding of it the way that's more parallel to the old way I learned and then apply that to the new way. Come on... Your post offered nothing of value. How about saying, "I think a better approach would be to do it the more accepted way first and that's done like this:"
  2. Thanks guys. First I'd like to tackle this the non-DOM way and then go about it the DOM way to round out my understanding. For now, the first way I'm still unclear on as the dynamic nature of the strings involved is throwing me for a loop here. Can you provide a code segment to explain this? For now I'm doing a file_get_contents to load up the hole HTML page. Once I have that I can easily find the title tag. However, since the month/date (plus spaces and a dash) are dynamic AND I need the text after it) I'm not at all sure how to segment out the middle section. Explode isn't going to cut it I don't believe as the delimiter isn't the same on both sides. Remember the string is essentially: <title>This weekend's stats for February 22-23, 2013 ---</title> Then the next hurdle is how to adjust that to be able to do the same thing for the movie titles as, in this case, a preg_match seems obvious. I need an array of upwards of 80 movies to select from. That looks like this: (assuming I can paste this): <td><font size="2"><a href="/movies/?id=safehaven.htm"><b>Safe Haven</b></a></font></td> The text I'll need there is the URL and, separately, the textual movie title. Thanks again.
  3. I'm brand new to PHP coding (but was a old-time VB coder). I figured out how to search a URL for a string. What I'm looking to figure out is two-fold: 1. I want search a specific site and grab some content there that's date-specific. That date is listed in the site's Title tag so the title tag will say something like "This weekend's stats for February 22-23, 2013 ---". I can search for the title tag but how to I go about actually turning just the key piece I need into a string? 2. Also on this page I need to find roughly 80 pieces of data that will be all the same except for one unknown string in the middle of 80 TD/URL/name tags (movie titles). How do I get the 80 items into an array? I'm sure I'll use a FOR loop or WHILE loop but what's the code for this look like to get those lines into strings? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.