Auto-Update Stats

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXIAH.com » Help » Auto-Update Stats
Auto-Update Stats
 Fenrir.Vandit
Offline
Server: Fenrir
Game: FFXI
user: JoshG
Posts: 3
By Fenrir.Vandit 2009-05-04 16:37:41
Link | Quote | Reply
 
Ever since creating the site for my Linkshell everyone has complained about the task of updating their stats manually. Many of them have told me about how this site automatically updates and after running through the possibilities and looking up some rather odd PHP codes I am utterly confused and baffled. I would greatly appreciate it if you could help me incorporate this feature into my site by providing me with some code or at least pointing me in the right direction. Thanks.
 Shiva.Xellith
Offline
Server: Shiva
Game: FFXI
user: Xellith
Posts: 916
By Shiva.Xellith 2009-05-04 16:41:38
Link | Quote | Reply
 
cant you just have a member list with each member page leading to an FFXIAH user page?

that would seem more ideal for what you are trying to achieve.
 Fenrir.Vandit
Offline
Server: Fenrir
Game: FFXI
user: JoshG
Posts: 3
By Fenrir.Vandit 2009-05-04 19:59:12
Link | Quote | Reply
 
Not really. Seeing as that is an external link off of my site and not in the format I wish to have it. I simply just want to keep up with job levels and nothing more. A link to here works but is not ideal. Not to mention in order to see their stats they would all have to register on this site as well would they not?
 Lakshmi.Jaerik
Administrator
Offline
Server: Lakshmi
Game: FFXI
user: Jaerik
Posts: 3834
By Lakshmi.Jaerik 2009-05-04 23:17:42
Link | Quote | Reply
 
I've posted a detailed explanation of the profile scanning system and troubleshooting tips here.
 Fenrir.Vandit
Offline
Server: Fenrir
Game: FFXI
user: JoshG
Posts: 3
By Fenrir.Vandit 2009-05-05 16:44:13
Link | Quote | Reply
 
Yes, I've already read that but that reveals nothing as far as code goes. I'm trying to make a script that basically opens up the web page to view the source code and extract the stats that I want. My problem is that the site returns an error. First this was saying my language settings were not set but I fixed that. Now everytime it seems to be reading the code for setting the timezone and i'm not sure how to get past that.
 Lakshmi.Jaerik
Administrator
Offline
Server: Lakshmi
Game: FFXI
user: Jaerik
Posts: 3834
By Lakshmi.Jaerik 2009-05-05 16:53:00
Link | Quote | Reply
 
You're going to need to provide whatever time zone and other cookies the site requires in your call, whether you're using cURL or otherwise...
necroskull Necro Bump Detected! [73 days between previous and next post]
 Phoenix.Eckeward
Offline
Server: Phoenix
Game: FFXI
user: eckeward
Posts: 73
By Phoenix.Eckeward 2009-07-17 11:25:52
Link | Quote | Reply
 
Thanks for the help Jaerik. Now I don't have to abuse the FFXIAH bandwidth.
I've been playing and found if you enable cURL in PHP then you can use this code, based on this example

Code:

//this should get round the language error
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml";
$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive: 300";
$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header[] = "Accept-Language: en-us,en;q=0.5";
$header[] = "Pragma: ";
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

//this should get round the timezone error
curl_setopt($ch, CURLOPT_COOKIE, "LSCOM_TIMEZONE_ID = Europe/London");



Try the exmple, changing the address and filename with that code added before curl_exec.
[+]
Log in to post.