Jump to content

supermerc

Members
  • Posts

    365
  • Joined

  • Last visited

    Never

Everything posted by supermerc

  1. Hey once again, I need a preg_match function that will get b726b788e55b9096da3d164580ddf24c out of: <input type="hidden" name="codeid" value="b726b788e55b9096da3d164580ddf24c"> Thanks for the help!
  2. <div style="border-bottom:1px solid black;"> <a href="formraid.php?target=M615&h=a845528fd557c16535ff045a084cabc8"><img align="right" border="0" alt="Attack!" src="images/raidz.jpg" onmouseover="popup(event,'Form new raid!');" onMouseOut="kill();"></a> <a href="/mob.php?id=8048&h=a845528fd557c16535ff045a084cabc8" ONMOUSEOVER="popup(event,'<b>Last killed by</b>: †Noc Supremacy†')" ONMOUSEOUT="kill()"><font color="#009900">King Ashnar, Lord of the Unliving [275]</font></a> </div>
  3. I dont understand what you are saying
  4. hey, Im using curl to get a page and somewhere on the page it says formraid.php?target=M615&h=1019c65257c6dd2ec4200602e83369c4 I want to do a preg_match that will get everything after formraid.php?target= so for that example id need M615&h=1019c65257c6dd2ec4200602e83369c4 anyone know how to do that?
  5. But i dont understand how can I make my loop open 5 iframes in new page then 5 more in new one after that etc.
  6. Hey, I have a script where when you click on a link it opens from 20-30 iframes in the page to a x,y coordinate where is located a recaptcha so its basicly 20-30 recaptcha's beside each other. The only problem is that it can take a while to load 20-30 pages and you cant really start entering them till they are all loaded so you lose a lot of time. What I thought of doing is make them open in popup and make there only like 5 per page. My code right now is: <?php include 'config.php'; $order = $_GET['order']; $raid = $_GET['raid']; $all_members = mysql_query("SELECT * FROM accounts where rank = '$order' ORDER BY level DESC") or die(mysql_error()); if(mysql_num_rows($all_members) > 0) { while($row = mysql_fetch_assoc($all_members)) { $q = mysql_query("SELECT * FROM accounts") or die(mysql_error()); if(mysql_num_rows($q) > 0) { echo "<iframe src=\"scroll.php?id=$row[owid]&raid=$raid\" width=\"325\" height=\"200\" scrolling=\"no\"></iframe>"; } } } echo '</table>'; ?> So it loops all the accounts in database to load in iframe, but what i want is to load first 5 in popup, then 5 other in another popup etc. Can anyone help?
  7. You can add a fourth parameter to preg_match_all(), PREG_SET_ORDER, to order the subpatterns together in arrays. Then loop through each set: <?php foreach ($matches as $array) { //$array[1] is the grabbed ID //$array[2] is the grabbed corresponding name } ?> Can you elaborate on "You can add a fourth parameter to preg_match_all(), PREG_SET_ORDER, to order the subpatterns together in arrays." PLease
  8. I did do that Array ( [0] => Array ( [0] => Sigil BabyBrutes< [1] => Sigil PotHunting< [2] => Sigil PotHunting1< [3] => Sigil PotHuntingFIRE< [4] => Sigil PotArcane1< [5] => Sigil PotArcane2< [6] => Sigil PotHoly< [7] => Sigil babykillerv6< [8] => Sigil PotKinetic2< [9] => Sigil PotKinetic< [10] => Sigil PotShadow2< [11] => Sigil PotShadow1< [12] => Sigil PotShadow< [13] => Sigil PotHoly2< [14] => Sigil PotHoly1< [15] => Sigil PotKinetic1< [16] => Sigil bloodyslet< [17] => Sigil Bloodieke< [18] => Sigil Weezer< [19] => Sigil Bruce< [20] => Sigil xKiLLeR13x< [21] => Sigil BabyGovernment< [22] => Sigil BabyCobalt< [23] => Sigil BabyDest< [24] => Sigil BabyLifeforces< [25] => Sigil BabySoulgems< [26] => Sigil BabyNoc< [27] => Sigil babykillerv4< [28] => Sigil babykillerv5< [29] => Sigil BabyCrewstones< ) [1] => Array ( [0] => 22829 [1] => 24039 [2] => 24040 [3] => 24041 [4] => 24044 [5] => 24046 [6] => 24051 [7] => 99876 [8] => 24061 [9] => 24059 [10] => 24057 [11] => 24056 [12] => 24054 [13] => 24053 [14] => 24052 [15] => 24060 [16] => 6380 [17] => 6381 [18] => 6394 [19] => 6396 [20] => 6650 [21] => 10769 [22] => 8407 [23] => 10771 [24] => 10773 [25] => 10775 [26] => 10774 [27] => 99874 [28] => 99875 [29] => 10832 ) [2] => Array ( [0] => BabyBrutes [1] => PotHunting [2] => PotHunting1 [3] => PotHuntingFIRE [4] => PotArcane1 [5] => PotArcane2 [6] => PotHoly [7] => babykillerv6 [8] => PotKinetic2 [9] => PotKinetic [10] => PotShadow2 [11] => PotShadow1 [12] => PotShadow [13] => PotHoly2 [14] => PotHoly1 [15] => PotKinetic1 [16] => bloodyslet [17] => Bloodieke [18] => Weezer [19] => Bruce [20] => xKiLLeR13x [21] => BabyGovernment [22] => BabyCobalt [23] => BabyDest [24] => BabyLifeforces [25] => BabySoulgems [26] => BabyNoc [27] => babykillerv4 [28] => babykillerv5 [29] => BabyCrewstones ) )
  9. Could someone explain to me how foreach works? I have a curl script that gets a page then with the page I do a preg_match_all to find some data preg_match_all('~<td style="padding-left:25px;" align="left">Sigil</td>\s*<td><a href="profile\.php\?id=([^"]+)">([^<]*)<~', $data, $matches); I get data in $matches[1] and $matches[2] And I want to do a foreach statement so separate them all so for each pair of 1 and 2 I can do something with them. So if someone could explain me how it works. I tried: foreach($matches as $array) { foreach($array as $match) { and i got weird letters and numbers as my variables and it wasnt the case, then I tried: foreach($matches as $k=>$match) And it got me something else that was weird so if someone could explain it to me so I finally understand how it works it would help a lot.
  10. I see, however I noticed that you put \s* which i think means a white space? However the code i showed you was cleaned up a bit to make it easier for you to understand, the way it appears in the source is like this: <tr> <td style="padding-left:25px;" align="left">Drifters</td> <td><a href="profile.php?id=7929">HardBaLLz</a></td> <td align="center">65</td> </tr> <tr> <td style="padding-left:25px;" align="left">Drifters</td> <td><a href="profile.php?id=22746">0ddBaLL</a></td> <td align="center">66</td> </tr> Does that make a difference?
  11. <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://site.com'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, 'field=whatyouwanttopost'); curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $store = curl_exec ($ch); curl_close ($ch); ?>
  12. Hey I know nothing about regex and Im getting a page with curl with something that looks like this: <tr> <td align="center"> <img src="/images/crewup/off.gif"> </td><td style="padding-left:25px;" align="left">Drifters</td> <td><a href="profile.php?id=7929">HardBaLLz</a></td> <td align="center">65</td> /tr> <tr> <td align="center"><img src="/images/crewup/off.gif"></td> <td style="padding-left:25px;" align="left">Drifters</td> <td><a href="profile.php?id=22746">0ddBaLL</a></td> <td align="center">66</td> </tr> ETC.. What I basicly want to do is grab all the ones that have <td style="padding-left:25px;" align="left">Drifters</td> and get their id from <td><a href="profile.php?id=22746"> name their name from <td><a href="profile.php?id=22746">0ddBaLL</a> So from that one id have 22746 OddBaLL Does anyone know how to do this?
  13. Hey, this might be a stupid question but I want to do a curl funtion and have a variable in it forexample: curl_setopt($ch, CURLOPT_URL, 'http://quiver.outwar.com/trade.php?tradeWith=7200&addItem=6919211&addHash=$hash'); $hash is the variable I want to put in but i dont know what to put around it for it to count as the variable and not just the text $hash. thx
  14. it still returns as no match
  15. I know nothing about regex someone made that for me to get something else and I just changed it for this but i guess it didnt match.. So i dont understand what you both are saying :S
  16. hey, Im using curl to go to a page and i want to get the hash for items, links look like this: /trade.php?tradeWith=7210&addItem=6919211&addHash=894882156e40dd8eedf3bb5b94c9d5f9 What i have right now is: $data = $result2; preg_match('~/trade.php?tradeWith=7210&addItem=6919211&addHash=([^"\']*)"~i',$data,$matches); but its returning empty.. anyone know why?
  17. http://pulse.comxa.com/raid/get_raid.php Chancellor Fangore is the link i want to get, this is the code: $data = $result1; echo $data; preg_match_all('~<a[^>]*href\s?=\s?["\']http://quiver.outwar.com/joinraid.php\?raidid=([^"\']*)"~i',$data,$matches); print_r($matches);
  18. I added print_r($matches); to test it and I get Array ( [0] => Array ( ) [1] => Array ( ) ) and i know for a fact there is atleast one result
  19. Hey, im using curl to get a page and I would like to use preg_match_all to find links that start with something. for example the links look something like this: http://quiver.outwar.com/joinraid.php?raidid=379141&h=abc0bbf0b2e4acfec4b6dc7a3a05557b but the raidid changes every time so i need to grab all the links that start with http://quiver.outwar.com/joinraid.php?raidid= so I can get the raid id from each. can anyone help me with the regex?
  20. Sorry this is pretty late but I had given up on it for a bit I was tired of working on this and not working but I decided to check up on it and your code works perfectly Kat, thanks a lot!
  21. It doesnt work. I dont think its a background image because as I said before, my original script works to change the border, its just when a new one is clicked i need the previous to go away. Here Ill show you an example of my page with my original script so you know what I mean. Original script function selectItem(divid){ var item_border = document.getElementById('v_item_border'+divid); var item_box = document.getElementById(divid); if(item_box.checked == true) { item_box.checked = false; item_border.style.border="0px"; } else { item_box.checked = true; item_border.style.border="2px solid #cc0000"; prevId = divid; } } http://pulse.comxa.com/crew_vault.php
  22. yea I do have an image to work with, i click on the image and it selects the radio button accordingly thx to the function i showed you before.
  23. oh sorry i didnt see that last part of number 3, the onclick part of the html does something tho, it selects the image for the ratio button function selectItem(divid){ var item_border = document.getElementById('v_item_border'+divid); var item_box = document.getElementById(divid); if(item_box.checked == true) { item_box.checked = false; } else { item_box.checked = true; } }
×
×
  • 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.