 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
|
 |
|
 |
02-12-2009, 10:27 PM
|
#41 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 65
Thanks: 0
|
Quote:
Keep working on it! I'm sure you will solve it
And when it's working, we can add it to the class
|
I certainly will just maybe a while got other $$$ project on the table at the moment. I have tried running that script by some very intelligent individual for help and mostly due to the time to Analise it and complexity I haven't got a lot of response on a solution.
Quote:
|
I went for a file based caching with the use of ob_start() and ob_end_flush().
|
That is quite the idea there, just temporarily storing the seldom changed armory XML files in files on your site. 
|
|
|
|
02-13-2009, 08:07 AM
|
#42 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Great!
I have a question, how does the armory look when it's "offline" ? Is it just showing an error like "Armory is currently offline due to updates"(example)? Or is it inaccessable(physically OFFLINE)?
__________________
|
|
|
|
02-13-2009, 09:05 AM
|
#43 (permalink)
|
|
The Wanderer
Join Date: Feb 2009
Posts: 11
Thanks: 2
|
It shows a message that there is maintenance.
|
|
|
|
02-19-2009, 08:26 PM
|
#44 (permalink)
|
|
The Visitor
Join Date: Feb 2009
Posts: 4
Thanks: 0
|
Hi,
before all sorry for my poor english (i'm french)
I'm simply do that
PHP Code:
<?php
class armory {
const BROWSER="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3";
public $query;
public $server;
public $guild;
public $guildie;
public $page;
public function __construct($query, $server, $guild, $guildie, $page)
{
$this->query = $query;
$this->server = $server;
$this->guild = $guild;
$this->guildie = $guildie;
$this->page = $page;
}
public function pull_xml()
{
// change the first part of the $url to the armory link that you need
if($this->query === 'roster')
{
$url = 'http://eu.wowarmory.com/guild-info.xml?r=' . urlencode($this->server) . '&n=' . urlencode($this->guild) . '&p=' . $this->page;
}
elseif($this->query === 'character')
{
$url = 'http://eu.wowarmory.com/character-sheet.xml?r=' . urlencode($this->server) . '&n=' . $this->guildie;
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_USERAGENT, self::BROWSER);
$url_string = curl_exec($ch);
curl_close($ch);
//return simplexml_load_string($url_string);
return $url_string;
}
}
$armory = new armory('roster', 'Culte de la Rive noire', 'Pöst Mörtem', NULL, NULL);
$xml = $armory->pull_xml();
echo $xml;
?>
and the return is
PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="/layout/error503.xsl"?><page globalSearch="1" lang="en_us">
<errorhtml/>
<!-- IE 512 byte friendly error override
...........................................................
...........................................................
...........................................................
...........................................................
...........................................................
...........................................................
-->
</page>
what's wrong ? 
|
|
|
|
02-20-2009, 03:27 AM
|
#45 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
Looks like the server has returned a 503 error (service unavailable) and therefore is unavailable. The cause can be anything from the server undergoing maintenance(I.e. Forcing the message via mod_rewrite etc) too the server being under too much load to complete your request.
You will have to wait and try again later.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|
02-20-2009, 11:20 AM
|
#46 (permalink)
|
|
The Visitor
Join Date: Feb 2009
Posts: 4
Thanks: 0
|
ok but when i'm trying to do that from the armory, there isn't 503 error.
I supposed that blizzard block external request. But i'm just trying to recall script today and it's work
let's go to making a cache systeme
thx a lot and another time sorry for my bad english
|
|
|
|
02-20-2009, 07:11 PM
|
#47 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
Quote:
Originally Posted by SawGore
ok but when i'm trying to do that from the armory, there isn't 503 error.
|
The
Quote:
|
href="/layout/error503.xsl"
|
part of your response from the server led me to believe otherwise.
Quote:
|
thx a lot and another time sorry for my bad english
|
No probs m8, any time.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|
02-24-2009, 09:07 PM
|
#48 (permalink)
|
|
The Visitor
Join Date: Feb 2009
Posts: 2
Thanks: 0
|
Hey, this script is really really nice but.. I have a few questions.
I'm kinda noob and I wonder how I can write out the characters guildname and gear etc etc, don't really get it how it works 
Last edited by Stoffe : 02-24-2009 at 09:28 PM.
|
|
|
|
03-06-2009, 09:05 PM
|
#49 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
So, I've been beating my face against a wall trying to figure out how to integrate armory data into my guild's website when I finally came across this page and realized this may be well above my expertise.
I'm a designer, and am familiar with CSS/HTML and building simple, easily laid out pages. I am unfamiliar with PHP and XML; even the acronyms frighten me.
Is there an easy step-by-step guide out there that can guide me through the process of integrating roster information into a page which I can style?
I'm a full time dad with two real-life kids and 140 in-game children who require constant attention and guidance -- especially the latter -- so I'd love to find a solution which doesn't require learning PHP from the ground up; I just don't have the time right now.
Any help would be greatly appreciated. I understand asking someone to write a detailed explanation will likely be well outside the scope of this thread -- and may very well be a huge undertaking -- so if anyone knows of a pre-existing guide that could help that would be a great start.
|
|
|
|
03-06-2009, 11:28 PM
|
#50 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 65
Thanks: 0
|
There really is no step by step guide.
For myself I have been building websites for almost 15 years and PHP XML and javascript are all fairly well in hand. So as I began to make a custom solution for my guilds new web site (3rd one we have gone to) I was easily able to pick up on advanced techniques to incorporate them into some very original ideas.
Your best solution, if you have no coding experience for such an endeavor, is to go find a pre-made package. There are tons and many include the roster upload feature, plus they will have things like forums, event calendars and DKP tracking.
|
|
|
|
03-06-2009, 11:56 PM
|
#51 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
Quote:
Originally Posted by Krik
There really is no step by step guide.
For myself I have been building websites for almost 15 years and PHP XML and javascript are all fairly well in hand. So as I began to make a custom solution for my guilds new web site (3rd one we have gone to) I was easily able to pick up on advanced techniques to incorporate them into some very original ideas.
Your best solution, if you have no coding experience for such an endeavor, is to go find a pre-made package. There are tons and many include the roster upload feature, plus they will have things like forums, event calendars and DKP tracking.
|
Well, I was hoping I could copy and paste a few lines of code into Dreamweaver and take the easy route. Unfortunately, that doesn't look to be the case.
And I appreciate the recommendation, but a pre-built package really isn't something I want to deal with at the moment. Beyond already receiving a very healthy hosting package for next to nothing from a business associate of mine, I dislike some of the limitations that come with using them. On top of that, I put a lot of work into the current site, and the idea of moving everything over to another system, having to adapt the assets and content, doesn't appeal to me.
I may just have to put my nose to the grindstone, use that Lynda.com subscription I pay good money for, and figure out how to do this the right way.
I do appreciate the response, however; thanks for taking the time :)
|
|
|
|
03-07-2009, 12:22 AM
|
#52 (permalink)
|
|
The Wanderer
Join Date: Feb 2009
Posts: 11
Thanks: 2
|
Quote:
Originally Posted by commonmind
Well, I was hoping I could copy and paste a few lines of code into Dreamweaver and take the easy route. Unfortunately, that doesn't look to be the case.
|
If you take a look at all the snippets on this thread, you can actually set it fully up, and if you don't understand a certain part you can always ask around here or elsewhere or be like me and make use of the online PHP manual at the official website of PHP.
I'm not expert in PHP either but more a beginner (aka newbie), yet with the snippets provided in this thread I managed to fully setup a custom roster ( http://resistance.pewpew.nl/members.php) which is not quite done yet, even now I'm trying to figure certain wow armory things out :)
By the way, is Lynda really that good?
By the sound of it, they aren't seeing you here asking around.
|
|
|
|
03-07-2009, 01:15 AM
|
#53 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
Quote:
Originally Posted by Yinx
If you take a look at all the snippets on this thread, you can actually set it fully up, and if you don't understand a certain part you can always ask around here or elsewhere or be like me and make use of the online PHP manual at the official website of PHP.
I'm not expert in PHP either but more a beginner (aka newbie), yet with the snippets provided in this thread I managed to fully setup a custom roster ( http://resistance.pewpew.nl/members.php) which is not quite done yet, even now I'm trying to figure certain wow armory things out :)
By the way, is Lynda really that good?
By the sound of it, they aren't seeing you here asking around.
|
Well, what I was asking for was a simple step-by-step guide for setting up this specific functionality on my site, so I could forgo learning an entirely new aspect of web development. That's not really a strike against Lynda.com, because I was just looking for an easy out. Again, being a full time father and GM of a raiding guild, among other creative endeavors, leaves me with very little time, and even less mental clarity.
And great job on the roster and the site in general, really clean and well-put together. I'd be interested to know how you set up your calendar, as I built mine by hand with tables, and it requires constant maintenance in order to keep up to date.
I also want to apologize; I didn't mean to derail the thread with my request. I was simply looking for a solution, and this thread was the closest I came to finding actual intelligent individuals discussing the very thing I've been trying to do for several weeks. It's a bit like walking into a room full of billionaires and screaming out: "How did you do it!?" In other words, I feel like an ass now for selfishly requesting an easy solution to a problem some of you have obviously been working hard to solve.
|
|
|
|
03-07-2009, 07:47 AM
|
#54 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 65
Thanks: 0
|
Now that I have a touch more time to respond I thought maybe I would try to give you some things to get you started. Be warned this post could get real long, sorry.
First, I do understand your desire to build it all yourself. But with no experience in programing you are quite limited it what you can do. At minimum you need a beginner knowledge of both PHP and MySQL (database) to even get basic functionality. I know for myself shortly after learning just few nice tricks in php I got the opportunity to set up a e-commerce site. And since my knowledge was so inadequate I bought a package. That was were I really got myself into php. So don't turn away something that is already made as learning to modify it will really get you off the ground the easy way.
I saw you asked about a calendar script and I think I can get you started there. Now the calendar I have built has features like being able to scroll backwards and forwards through months, the ability for users to mouse over scheduled events to get details and then click on it to sign up. Then the admin side has the ability to schedule events approve signups or put the signup on stand by. As well it ties into a DKP system so as to associate and event with what was spent or earned. The script is so complex you would be lost in seconds.
So what I can give you is how I learned to write such a calendar. The truth is my first one 5 or 6 years ago came from a free script off http://www.hotscripts.com. Since then I have rewritten it 4 times (for different usages) to be what it currently is. And I suspect if you look on http://www.hotscripts.com you will find something that can get you started.
Now I mentioned MySQL. This will be key to any functionality. If you want to schedule and event you have to store that data, if you want to have a roster on your web site you will need to store that data. So grab a quick tutorial on MySQL because being able to store and retrieve that data will make your life so easy. And a basic script is very simple to setup.
Now that is just some basics if you must do it yourself. But if you are willing to get some free code, there is tons. You have to think there is 10 million WoW players, there is good chance people have done all the work for you.
So were to look well there is three packages you will need to know about. Joomla, PHPNuke, and Wordpress. Each has several WoW addon modules for them so just do a google search for each and WoW (ie. "Joomla WoW") and you will find some nice stuff.
Here is a few links I found that had more to do with just rosters. And you will notice 2 wordpress modules and a phpbb module.
http://www.wowroster.net/
http://wordpress.org/extend/plugins/wow-armory/
http://timsworld.nfshost.com/wordpre...ory-wp-plugin/
http://www.phpbb.com/community/viewt...203255&start=0
Anyway there is tons of free stuff for anyone that doesn't have all the skill or time to build their own. And it is very good way in my opinion to begin learning how to make your own.
On side a note, my site will not be using any of these packages or modules I mentioned even the forums are built by myself. I should also point out I started my project 6 months ago and still it is maybe at best half done. So while building it yourself is nice you should note that it takes a lot of time to do that. So I encourage the do it yourself approach but you will need to first get your feet wet with something that has most the hard work done for you and in time you will be able to do it all if you have the desire and time to.
|
|
|
|
03-07-2009, 09:52 PM
|
#55 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
I really appreciate the lengthy and detailed response. Taking your advice, I've spent the morning with some MySQL and PHP tutorials, and despite my aforementioned hesitation to learn an entirely new facet of web development, I'm actually quite intrigued by the possibilities. I might go so far as saying I'm even a little enthusiastic.
I've downloaded MAMP and WAMP for the Mac and PC I do the majority of my work on, and in a few weeks I should have sufficient enough knowledge to break something beyond repair :)
Thanks again!
|
|
|
|
03-09-2009, 12:21 AM
|
#56 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
Wondering if someone could post the full PHP code they used to achieve displaying their roster on their own page, so I can make some sense of it. I've gone back through the thread, but the snippets I've been seeing are sometimes separated into multiple blocks and I really can't figure out how to put it all together.
What I'm trying to achieve is pasting said code into a PHP document that I can then view so I can see, in general, how it functions. I've spent the majority of the day doing a crash course in some PHP basics, and now that certain aspects of the code are making more sense, I'd like to see it in action.
|
|
|
|
03-09-2009, 04:53 AM
|
#57 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 65
Thanks: 0
|
Lets brake this down some. Most of the code here is very advanced.
To get what you need you only will be using 2 PHP function libraries. You will need to know about cURL and simple XML. Use php.net for information on any php functions.
Now for the cURL part this is all you need
PHP Code:
$url = 'http://www.wowarmory.com/guild-info.xml?r=YOUR+SERVER&n=YOUR+GUILD&p=1'; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"); $rosterxml = curl_exec($ch);
For the $url variable just go to your guilds roster page on the wow armory and copy out the URL.
Now with just that above if you echo the $rosterxml you will see in your browser the XML for your guilds roster.
So now all you need to do is parse the XML and this is where simple XML comes into play.
PHP Code:
$xml = new SimpleXMLElement($rosterxml);
foreach ($xml->guild->members->children() as $char) { echo 'Name: ' . $char['name'] . ' '; echo 'Class: ' . $char['class'] . ' '; echo 'Level: ' . $char['level'] . ' <br>'; }
Combining those 2 segments of code will display a quick list of all characters in your guild.
Now for it to be most effective you may want to load that data to a database. And in that case replace the above segement with something like
PHP Code:
$location = "localhost"; $username = "dbusername"; //place your database username here $password = "dbpassword"; //place your database password here $database = "dbname"; //place your database's name here $open_db = mysql_connect("$location","$username","$password");
if (!$open_db) die ('Could not connect MySQL'); mysql_select_db($database,$open_db) or die ('Could not open database');
$xml = new SimpleXMLElement($rosterxml);
foreach ($xml->guild->members->children() as $char) {
$insqry = " INSERT INTO `Roster` ( `record_number`, `Char_Name`, `Char_class`, `Chara_Level` ) VALUES ( '', '" . $char['name'] . "', '" . $char['class'] . "', '" . $char['level'] . "' ) ";
$res_ins = mysql_query($insqry) or die(mysql_error()); }
That is about it for handling the data for your roster. Do note that "name" in $char['name'] is one of the attributes of the <character> node in the XML that you will be parsing. And that any attribute in any <character> node can be retrieved by its attribute name.
So I hope that helps get you going.
PS. I didn't test this so if anyone spots an error please feel free to note it.
|
|
|
|
03-09-2009, 07:11 AM
|
#58 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
I appreciate the guiding hand Krik; I'm going to spend some time working through the above and seeing if I can't figure this thing out. I'll report back as soon as I've sufficiently broken something.
|
|
|
|
03-09-2009, 01:03 PM
|
#60 (permalink)
|
|
The Wanderer
Join Date: Mar 2009
Posts: 20
Thanks: 5
|
You say without cURL; how did you achieve this, and what's the major difference here.
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|