Jump to content

Bakes

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Bakes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Bakes

    [SOLVED] Remove

    <?php $str = file_get_contents('pbsvss.htm'); preg_match_all('#<a href="([^"]+)".+?GUID=([^(]+)#is', $str, $id); $count = count($id[0]); for ($a = 0 ; $a < $count ; $a++) { echo $id[1][$a] . ' ' . $id[2][$a] . "<br />\n"; } ?> <p> <a href=pb000001.htm target=_blank>000001</a> "Go Away" (W) GUID=671e78a6308032bed8b1d14587e24de4(VALID) [2009.05.28 19:22:06] <p> <a href=pb000002.htm target=_blank>000002</a> "Bakes" (W) GUID=d990f5eab60849cce1f9a73891f45ece(VALID) [2009.05.28 19:22:19] <p> <a href=pb000003.htm target=_blank>000003</a> "Go Away" (W) GUID=671e78a6308032bed8b1d14587e24de4(VALID) [2009.05.28 19:22:39] <p> <a href=pb000004.htm target=_blank>000004</a> "Bakes" (W) GUID=d990f5eab60849cce1f9a73891f45ece(VALID) [2009.05.28 19:22:49] <p> <a href=pb000005.htm target=_blank>000005</a> "Go Away" (W) GUID=671e78a6308032bed8b1d14587e24de4(VALID) [2009.05.28 19:23:10] <p> <a href=pb000006.htm target=_blank>000006</a> "Bakes" (W) GUID=d990f5eab60849cce1f9a73891f45ece(VALID) [2009.05.28 19:23:25]
  2. Bakes

    [SOLVED] Remove

    Unfortunately, it's still a blank page. My code is: <?php $str = implode('', file('pbsvss.htm')); preg_match_all('#<a href="([^"]+)".+?GUID=([^(]+)#', $str, $id); $count = count($id[0]); for ($a = 0 ; $a < $count ; $a++) { echo $id[1][$a] . ' ' . $id[2][$a] . "<br />\n"; } ?>
  3. Bakes

    [SOLVED] Remove

    I want them both (in seperate values) Unfortunately, that doesn't work (returns a blank page).
  4. Bakes

    [SOLVED] Remove

    I'm trying to use this to get 00001 (It's a url, actual code is): <a href="pb000001.htm" target="_blank">000001</a> "Go Away" (W) GUID=671e78a6308032bed8b1d14587e24de4(VALID) [2009.05.28 19:22:06] This is what I'm using, it works in testers, yet doesn't in my code. Can you tell what the problem is? preg_match('#<a href="([^"]+)#', $lines[$i], $id);
  5. I'm really confused with my REGEX's. They work horribly, so I'm not even going to post them here. 000001 "Go Away" (W) GUID=671e78a6308032bed8b1d14587e24de4(VALID) [2009.05.28 19:22:06] How would I strip all the characters other than: 671e78a6308032bed8b1d14587e24de4 Please help, I've been stuck with this for hours!
  6. Bakes

    Pass

    This is correct. The reason I am doing this, is because they are hosted on different webservers, for reasons I don't want to go into. I have replaced $_SERVER["PHP_SELF"] in the first included file with the true path, but I cannot do this for the banner because it changes for different pages. So, how would I pass the var between the first included page and its banner?
  7. Bakes

    Pass

    Ok, my php page includes a file, which includes a second file. The second file provides the navigation bar of the first file. Now, the navigation bar uses ' $_SERVER["PHP_SELF"];' to determine what page it's on, to determine what page, and as such what links to use. Unfortunately, this uses the included file rather than the main file. How would I get the current url of the main page, rather than the included page?
  8. Surely that creates an xml file, where what I actually want to do is read it?
  9. Ok, I am a complete and utter XML newb, and would like to have some RL examples of how to parse stuff (the tutorials just seem to confuse me). Is there any chance that someone could post some examples of how to grab the following: <Status Time="Sat May 02 14:13:01 2009"> <Clients Total="20"> <Client Name="ClientName" DBID="48107" Level="2" GUID="a2d5b747c828d13370c564ec27b66e3d" IP="24.12.59.32" Joined="Wed Nov 12 20:16:38 2008" Updated="Sat May 02 14:11:46 2009"> <Data Name="status" Value="OK"/> <Data Name="guid" Value="a2d5b747c828d13370c564ec27b66e3d"/> </Client> </Clients> <Type Name="TypeA" UsageLimit="None" Usage="2983"> <Data Name="protocol" Value="6"/> <Data Name="Rate" Value="25000"/> <Data Name="_TimeStart" Value="1240971694.78"/> </Type> </Status> Status -> Clients (want total) -> Client (want Name) -> Status (want values) Status -> Type (want Name) -> (want protocol, rate). Is there anyone who could post examples of how to get those values in simplexml? Many thanks
  10. The structure of my table is: (id) (unix_datestamp) (old_owner) (new_owner) so, old_owner = id of one of my users and new_owner = id of one of my users I would like to get a list of the rows where the old_owner is in the group 'users' and the new_owner is also in the group 'users' unfortunately, I don't know how I could join them so that: users.group = grouplist.id users.id = history.old_owner users.id = history.new_owner how would I do this?
  11. ah, I see, I didn't specify a FROM statement. All fixed now
  12. sorry, I didn't say that I renamed the tables, because the guy who i'm doing this for wants me to release as little as possible (I've done this, for the most part, in Python, but I'm having some trouble with the web interface, and the SQL.) it's actually something more along the lines of pho34_ugroup
  13. SELECT user.data1, user.data2, subgroup.name JOIN subgroup ON (subgroup.id = user.subgroup) JOIN group ON (group.id = subgroup.group) WHERE user.level = 30 AND group.rank = 20 gives me error #1064. I know the problem is that I am querying a joined table, but I am unsure how to fix it, so thought I'd post here. Can anyone show me what my problem is?
  14. ie; That would print the ids out, but I need to do an sql query based on id's in that.
  15. Not as far as I know; that would just print a load of crap, where I actually need to use the result in another query.
×
×
  • 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.