cbsarge Posted December 1, 2012 Share Posted December 1, 2012 (edited) This has to do with a game that I play called Superhero City. There is a page - http://www.shc-strategy.com/ - that someone else has created where you can put in a replay link (example: http://superherocity...attle=857337182 but, you would need a Facebook account) from a battle on the actual game page and it will show you a detailed breakdown of the battle. The person hosting the page has taken it down several times, password protected it, blocked certain people from using it, etc. I'd like to create something similar and make it open for everyone to use. That being said. The data that the above page uses is contained in a variable on the replay page called fvars. I believe he using file_get_contents or something like that to grab the page and then parse out the fvars variable value and perform some math on it to create charts and graphs. Everything I've written to date has been html or javascript. I have no php skills as yet and I'm finding it difficult to find a solution to this. It seems as if many of the php forums are assuming you are already an accomplished php programmer. Can anyone give me some help with this? If I could even just get the fvars content to echo out I'd be able to start work on using it to create some stats. Thanks in advance for any help given! My non-working (I knew it wouldn't work) attempt <?php $file = file_get_contents('http://superherocity.klicknation.com/game/pages/battle_replay.php?battle=857337182'); Echo fvars; ?> Edited December 1, 2012 by cbsarge Quote Link to comment https://forums.phpfreaks.com/topic/271428-referencing-a-variables-value-from-another-web-page/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.