
Codemunkie
New Members-
Posts
7 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
Codemunkie's Achievements

Newbie (1/5)
0
Reputation
-
Hello. I'm trying to use preg_match to get a large amount of data from a website, is it possible to do this? It's html so i was hoping for line breaks etc. The site source is below, which is what i'm wanting to retrieve. <p><iframe width="560" height="315" src="http://www.youtube.com/embed/P_ocwVLv55Y?wmode=transparent" frameborder="0" allowfullscreen></iframe></p> <p><strong><span style="text-decoration: underline;">New Skins in the Store</span></strong></p> <ul> <li>Royal Guard Fiora</li> <li>Nightraven Fiora</li> <li>Bladecraft Orianna</li> </ul> <p><strong><span style="text-decoration: underline;">PVP.net v1.55</span></strong></p> <ul> <li>Ranked Teams <ul> <li>Fixed a bug with the background on the Team Invite popup</li> <li>Fixed a bug where Team status would be missing on the Team Profile</li> <li>Fixed a bug where Ranked Team specific notifications would not send properly</li> <li>Fixed several bugs with client side stat calculation and display</li> </ul> </li> </ul> <p> <strong><span style="text-decoration: underline;">League of Legends v1.0.0.135</span></strong></p> <p> <strong>Fiora, The Grand Duelist</strong></p> <ul> <li><strong>Duelist (passive)</strong> - Fiora regenerates health over 6 seconds each time she deals damage. Striking champions will cause this effect to stack up to 4 times.</li> <li><strong>Lunge</strong> - Fiora dashes forward to strike her target, dealing physical damage. Fiora can perform the dash a second time within a couple seconds at no mana cost.</li> <li><strong>Riposte </strong>- Fiora's Attack Damage is increased. When activated, Fiora parries the next basic attack and reflects magic damage back to the attacker. Works against champions, monsters, and large minions.</li> <li><strong>Burst of Speed</strong> - Fiora temporarily gains additional Attack Speed. Each basic attack or Lunge she lands during this time increases her Movement Speed. Killing a champion refreshes the cooldown on Burst of Speed.</li> <li><strong>Blade Waltz (ultimate)</strong> - Fiora dashes around the battlefield to deal physical damage to enemy champions. Successive strikes against the same target deal less damage.</li> </ul> <p> <strong>Alistar</strong></p> <ul> <li>Triumphant Roar mana cost increased to 28/41/54/67/80 from 20/35/50/65/80</li> <li>Unbreakable Will mana cost reduced to 100 from 150</li> <li>Trample damage increased to 10-27 per second from 10-23</li> </ul> <p> <strong>Fizz</strong></p> <ul> <li>Base damage increased to 56 from 54</li> <li>Armor per level increased to 3.4 from 3.1</li> <li>Churn the Waters mana cost reduced to 100 from 150</li> </ul> <p> <strong>Galio</strong></p> <ul> <li>Idol of Durand damage range increased to 600 from 575</li> </ul> <p> <strong>Irelia</strong></p> <ul> <li>Fixed a particle issue with Transcendent Blades (Hotfixed 2/21)</li> </ul> <p> <strong>Jax</strong></p> <ul> <li>Fixed a bug where Grandmaster's Might passive attack canceled if the buff ran out during the attack animation</li> </ul> <p> <strong>Lee Sin</strong></p> <ul> <li>Sonic Wave base damage increased to 50/80/110/140/170 from 45/75/105/135/165 (Hotfixed 2/21 due to an unintended nerf in the Nautilus patch)</li> </ul> <p> <strong>Lux</strong></p> <ul> <li>Lucent Singularity <ul> <li>Now additionally grants vision while in flight to its destination</li> <li>Now starts its cooldown when cast rather than when detonated</li> <li>Cooldown increased to 10 seconds from 9</li> <li>Now displays a buff showing how long Lucent Singularity will last until it automatically detonates</li> </ul> </li> <li>Finales Funkeln <ul> <li>Now grants vision of the affected area during the spell and vision of enemy champions hit for a short duration afterwards</li> <li>Lux can no longer use Flash while casting Finales Funkeln</li> </ul> </li> </ul> <p> <strong>Malphite</strong></p> <ul> <li>Granite Shield now shows a cooldown timer</li> <li>Unstoppable Force <ul> <li>Area of effect radius on impact increased to 325 from 300</li> <li>Malphite can no longer flash while using Unstoppable Force</li> <li>Fixed a bug where Malphite would seem to hit the target but would not cause the effect</li> </ul> </li> </ul> <p> <strong>Miss Fortune</strong></p> <ul> <li>Strut now shows a cooldown timer</li> </ul> <p> <strong>Nocturne</strong></p> <ul> <li>Umbra Blades now has a passive cooldown timer like Ziggs and Shen</li> </ul> <p> <strong>Olaf</strong></p> <ul> <li>Axe Throw <ul> <li>Damage increased to 80-260 from 50-210</li> <li>Scaling changed to +1.0 bonus AD from +0.5 total AD</li> <li>Base cooldown reduced to 8 seconds from 10</li> <li>Cooldown reduction for picking up the axe reduced to 4.5 seconds from 6</li> </ul> </li> <li>Ragnarok now provides 30/45/60 Armor and Magic Resist instead of 20/30/40 flat damage reduction</li> <li>Movement Speed increased to 325 from 320</li> </ul> <p> <strong>Poppy</strong></p> <ul> <li>Paragon of Demacia now shows you over its icon how many stacks you have</li> </ul> <p> <strong>Shen</strong></p> <ul> <li>Fixed a few bugs with ability sounds</li> <li>The following changes were hotfixed out on 2/21: <ul> <li>Base armor reduced to 19 from 23</li> <li>Vorpal Blade health scaling lowered to 1.5% from 2%</li> <li>Feint Energy cost increased to 50 from 40 at all levels</li> <li>Base shield value reduced to 70/115/160/205/250 from 70/120/170/220/270</li> </ul> </li> </ul> <p> <strong>Teemo</strong></p> <ul> <li>Health per level increased to 82 from 77</li> <li>Move Quick's passive component now shows a cooldown timer</li> <li>Noxious Trap arm time reduced to 1 seconds from 2</li> </ul> <p> <strong>Tristana</strong></p> <ul> <li>Explosive Shot cast range increased to 625 from 600</li> </ul> <p> <strong>Ziggs</strong></p> <ul> <li>Hexplosive Mines <ul> <li>Mana cost reduced to 70/80/90/100/110 from 80/90/100/110/120</li> <li>Slow duration reduced to 1.5 seconds from 2</li> <li>Damage from 2nd and subsequent mines reduced to 40% from 50%</li> </ul> </li> <li>Fixed a bug where Ziggs' Mad Scientist skin was leaving particles on the map (Hotfixed 2/21)</li> </ul> <p> <strong>Items</strong></p> <ul> <li>Madred's Bloodrazor attack damage increased to 40 from 30</li> </ul> <p> <strong>General</strong></p> <ul> <li>Improved minimap visibility of turrets in Colorblind Mode</li> <li>Colorblind announcement colors now reference blue (friendly) and purple (enemy) teams</li> <li>Important items purchased by your team will now be called out in chat (Aura items, Sight and Vision Wards, top tier items, etc)</li> <li>Champion Kill messages are now more specific</li> <li>You can now activate a timestamp for game chat in the options menu</li> <li>When colorblind mode is activated, movement cursor is included with new color scheme (was not before)</li> <li>Announcer callouts no longer reference blue team/purple team, and instead should reference friendly/enemy team (ie. A friendly inhibitor is respawning soon/the enemy inhibitor has respawned)</li> <li>Champions will now attempt to run home immediately when disconnecting, rather than attempting to Recall</li> <li>Small monster camp sigils now restore up to 30 Mana in addition to Health</li> <li>Small Golem camp <ul> <li>Movement Speed increased to 300 from 180</li> <li>Medium Golem base damage increased to 59 from 54</li> </ul> </li> <li>Fixed a bug where whisper messages were the wrong color</li> </ul> <p> <strong>Co-Op Versus AI</strong></p> <ul> <li>Added Blitzcrank bot to the roster of bots in Co-Op versus AI.</li> <li>Improved bots' ability to last hit and reduced how much they push their lanes.</li> <li>Reduced the amount of gold given to bots on Summoner's Rift Intermediate.</li> <li>Added the ability for bots to call for help from nearby bots.</li> <li>Improved the precision of skill shots and ground targeted AoE abilities.</li> <li>Minor bug fixes with Leona, Lux, and Shyvana bots.</li> </ul> <p> <strong>Art</strong></p> <ul> <li>Fixed animation bugs on the following skins: <ul> <li>Toy Soldier Gangplank</li> <li>Jade Dragon Wukong</li> <li>Superb Villain Veigar</li> <li>Headhunter Master Yi</li> </ul> </li> </ul> <p><a href="http://euw.leagueoflegends.com/board/showthread.php?p=6422811"><strong>Click here to comment</strong></a></p> Here is my current php, that doesn't seem to work. (var p -> 'fiora-patch-notes') $content = file_get_contents("http://na.leagueoflegends.com/news/" . $_GET['p']); $regex = '#frameborder="0" allowfullscreen></iframe></p> (.*?) <p><a href="http://euw.leagueoflegends.com/board/showthread.php?p=#'; preg_match($regex, $content, $match, PREG_PATTERN_ORDER); echo $match; Note that my regex searches for the last bit of the first line, and the first bit of the last line in the page source. There's more source but i didn't see any point in posting it. I know it's going to be something really obvious, i'm not used to working with preg match. Thanks.
-
Works like a charm! Thanks very much
-
Hello, i'm trying to retrieve some information from another website using preg match all. Here is my current code i have, it works for my first match but no others. <?php $content = file_get_contents('http://leagueoflegends.wikia.com/wiki/Free_champion_rotation'); preg_match_all('#class="mw-redirect">(.*)</a></span></span></span>#', $content, $match, PREG_SET_ORDER); echo $match[0][1]; ?> The html i am wanting to parse is here. class="mw-redirect">Ahri</a></span></span></span> class="mw-redirect">Galio</a></span></span></span> class="mw-redirect">Graves</a></span></span></span> class="mw-redirect">Katarina</a></span></span></span> class="mw-redirect">Kog'Maw</a></span></span></span> class="mw-redirect">LeBlanc</a></span></span></span> class="mw-redirect">Shen</a></span></span></span> class="mw-redirect">Skarner</a></span></span></span> class="mw-redirect">Soraka</a></span></span></span> class="mw-redirect">Warwick</a></span></span></span> I'm only wanting to display the names after the class, which it does for 'Ahri' but nothing else. Can anyone help me with this?
-
Nevermind, there was an error in my code because the $cDay variable changed :L Works perfectly, thank you so much! Would you mind explaining a little how you made it work?
-
Loading my page with that code completely crashes my web browser :L No idea why!
-
<?php $cDay = date("d"); echo '<tr>'; for ($i=$cDay; $i<($cDay+7); $i++) { echo '<td width="14%" class="calender1a"><b>Sunday</b></td>'; } echo '</tr>'; echo '<tr>'; for ($i=$cDay; $i<($cDay+7); $i++) { echo '<td width="14%" class="calender2a">Raid<br />Time<br />Picture?</td>'; } echo '</tr>'; ?> Thats the code so far, the only thing i can't do is make it show the day names at the top...
-
Hello there! I've been at this for too long! I've got a normal calendar at the side of my website that works fine, however i would like one that shows the next 7 days starting at today. I have an image here that kind of shows what i want... So it will show the next 7 days starting with today, and going into the next month if todays date is the 30th etc. Could anybody please help me? :\