Jump to content

markvaughn2006

Members
  • Posts

    108
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

markvaughn2006's Achievements

Regular Member

Regular Member (3/5)

1

Reputation

  1. Anyway to make it find everything after the exampleleftside= up until the first double quote?? Thanks for the help!
  2. ...exampleleftside=thedataIwant">examplerightside How would one go about capturing the data I want from some html code similar to the one above? I know how and would be using file_get_contents, running a while loop, putting the captured data in a variable, and storing it to a database, I'm just not getting regex... Any help would be greatly appreciated, thanks!
  3. Do you think that google uses setTimout or setInterval to keep refreshing a file to check for new messages? I wouldn't think so.. but if not, anyone have any ideas how a new message pops up in the inbox when you get one? It must be pushed or auto-refreshing some code to check right? How are they doing this?? driving me crazy..
  4. I have a website hosted at godaddy and a website hosted at hostgator (don't flame). How would I go about sending data from one website into a database on the other website? Is that possible?? Thx!!
  5. as usual... the simple act of posting my question, leads me to the answer, solved... for anyone else that needs the answer to this question, the code I posted works, but for what I was doing, i just replaced the static number with a variable... silly
  6. I am trying to calculate a moving average. Example: Column names: id, date, price $result = mysql_query("SELECT * FROM mytable WHERE id > '10' ") or die(mysql_error()); while($row = mysql_fetch_array($result)){ $thisid = $row['id']; $sql2 = "SELECT AVG(price) FROM mytable WHERE id < '$thisid' ORDER BY id DESC LIMIT '10' "; $result2 = mysql_query($sql2); $row2 = mysql_fetch_array($result2); echo $row2['AVG(price)']."<br>"; } So, what this code is intended to do, is go through each row from mytable, and calculate an average of the 10 cells with an id less than $thisid. But.... no worky.. It is coming up with some kind of an average but it is not correct. The number it comes up with is close though, but wrong enough that it is definitely doing something wrong. Any help would be extremely appreciated!!
  7. If this is the wrong section sorry, I'm thinking this some kind of ajax call. On Facebook, if you scroll all the way down and click "Older Posts" and it looks like it is loading and then drops down with older posts. Could someone please point me in the right direction of how this might be done?? Thanks sooo much!
  8. sorry, I know this is simple, but stuck on it... how would one go about converting 1/21/11 to a UNIX timestamp, something like 1293035229? and while we are at it, how to convert 1293035229 to 1/21/11 ? (i know the timestamp is wrong, just for example) THX!!!!!
  9. Please help me, I know this should be simple... I need to capture everything between the <example> tags on a page and can only capture the first instance of it. here's my code (exampled out) $string = file_get_contents("http://www.example.com"); preg_match('~<example>(.*)</example>~isU', $string, $example); $example1 = $example[1]; $example1 will return the first instance of what I'm looking for. I know that preg_match_all comes into play somewhere here but not sure how to make it work... what is wrong with this.. preg_match_all('~<example>(.*)</example>~isU', $string, $example); $example1 = $example[1]; $example2 = $example[2]; $example3 = $example[3]; etc... Thanks for any help!!
  10. Hello, i know this is probably pretty simple but still very new to regex stuff... how would i go about retreiving - 0.008025 from this <span class="sg"> <span id="ref_73025_l">0.008025</span> so actually i would need to get everything in between '<span class="sg"><span id="ref_*">' and '</span>' the 73025_1 would be changing (sometimes 4,5,or 6 characters long)so I would need to wildcard that part somehow... and capturing the result in a variable? thanks!!!!!!!! :D :D
  11. i'm fairly fluent in php but don't really know where to even start with this....so please don't bite my head off for not posting code :-\ i just need a point in the right direction Example: if a user types in MSFT i need to be able to go to http://www.google.com/finance?q=msft (i know how to do this part) but then i need to be able to return just the price which in the source of that page is.. <span class="pr"> <span id="ref_358464_l">29.77</span> so i just need to have it so a user types in MSFT on my site and it goes to http://www.google.com/finance?q=msft, grabs the price ($29.77) and spits it out all on my site without the user actually being sent to google finance, a point in the right direction would be greatly appreciated!!!! love you guys, lifesavers!!
×
×
  • 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.