Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 14:00

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



WarRock Profile Parser - PHP

Discussion on WarRock Profile Parser - PHP within the WarRock forum part of the Shooter category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2014
Posts: 22
Received Thanks: 14
WarRock Profile Parser - PHP

Hello everyone, does you have a clan website?

Lazy about being dipendent from other website to get informations from nexon website?

Well, all what you need its this file, my warrock profile parser.

You can find the source code here:

Don't forget to give proper credits, and to press thanks.

The output will result in a json array, all what you need its use file_get_contents to get your json array.

Array values = nickname, level, kills, deaths, headshots (the percentage), exp, country

Output sample:

PHP Code:
{"nickname":"iRazer","level":"94","kills":"688024","deaths":"323206","headshots":1,"exp":"28856551","country":"Italy"
Please avoid useless replies such as "you can use regex instead of str_replace", i know it but i'm lazy
__Buffer is offline  
Thanks
4 Users
Old 06/17/2014, 13:53   #2



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
Parsing HTML with RegEx is a bad idea. You should use a XML/HTML parser instead.
+Yazzn is offline  
Old 06/17/2014, 14:21   #3
 
elite*gold: 0
Join Date: Jun 2014
Posts: 22
Received Thanks: 14
Well, i just made it in 15-30 min, made just for test
__Buffer is offline  
Old 06/17/2014, 15:15   #4



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
Why would you make bad code (even if it's "just for test") instead of making good code you can actually use in your products? Actually I don't see what you are testing here. Why would you post code you just made for testing? Just admit that you posted bad code and we'll never speak of it again.
+Yazzn is offline  
Old 06/17/2014, 15:42   #5
 
elite*gold: 0
Join Date: Jun 2014
Posts: 22
Received Thanks: 14
I have nothing to admit, lol, i just made it for test my html code because wa-sta api changed.

I'm not using it lol, i haven't any product where i should put this
__Buffer is offline  
Old 06/17/2014, 16:35   #6
 
AmazingTurtle's Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 422
Received Thanks: 324
Quote:
Originally Posted by Peter File View Post
Parsing HTML with RegEx is a bad idea. You should use a XML/HTML parser instead.
Have a closer look: He's actually not using RegEx. Even worse - split the string and replaced not required data...
Btw seems really nice O: I may use this for template-processing purpose in future, too
AmazingTurtle is offline  
Old 06/17/2014, 17:06   #7



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
I know that he is not using RegEx but he thinks it's good to use it.

Quote:
Originally Posted by __Buffer
Please avoid useless replies such as "you can use regex instead of str_replace", i know it but i'm lazy
+Yazzn is offline  
Old 06/17/2014, 17:57   #8
 
Sleutel's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 748
Received Thanks: 569
Quote:
Originally Posted by Peter File View Post
Parsing HTML with RegEx is a bad idea. You should use a XML/HTML parser instead.
Well okay thanks for the reply. This is a perfect example how it goes in this stupid community. Someone releases something an immediately the others start to tell how to do it better. If you claim you can do it better, write it yourself. It works, if you don't need to make a lot of requests then stick with it else you should considering optimizing the code or even rewriting it.

@ToXiiC Thanks for the release!
Sleutel is offline  
Thanks
4 Users
Old 06/17/2014, 18:14   #9
 
AmazingTurtle's Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 422
Received Thanks: 324
Constructive criticism should be accepted, not declined. Why don't you apply his suggesstions to your code? It's free advice to you, guys! Keep in mind: We don't want to hurt your feelings *lol*, we want you to feel yourself happier when you've written a better code. *lol²*
AmazingTurtle is offline  
Old 06/17/2014, 20:05   #10



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
@Sleutel That's what a forum is for: Discussion. You feel uncomfortable with that? Feel free to leave.
+Yazzn is offline  
Old 06/17/2014, 20:56   #11
 
Sleutel's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 748
Received Thanks: 569
Quote:
Originally Posted by /bin/cat View Post
Constructive criticism should be accepted, not declined. Why don't you apply his suggesstions to your code? It's free advice to you, guys! Keep in mind: We don't want to hurt your feelings *lol*, we want you to feel yourself happier when you've written a better code. *lol²*
Well this below post doesn't seem very constructive in my eyes does it in yours?

Quote:
Originally Posted by Peter File View Post
Why would you make bad code (even if it's "just for test") instead of making good code you can actually use in your products? Actually I don't see what you are testing here. Why would you post code you just made for testing? Just admit that you posted bad code and we'll never speak of it again.
If you really are positive then you would congratulate him for writing the code not telling him his code is bad. You should read a couple articles before you claim that code his code is bad. I bet you wrote bad code yourself. It's very destructive if you tell that someone code is bad. In my opinion is it good code because he wrote working code for the little knowledge he has of PHP. I know there are many solutions for solving problems but remember your solution isn't always the best. He did a great job of programming this.

Here is a perfect example:

Quote:
Originally Posted by Peter File View Post
@Sleutel That's what a forum is for: Discussion. You feel uncomfortable with that? Feel free to leave.
Your argument is invalid since you generalize it and second you are aiming for me instead of my argument I gave. If you really want to discuss this then at least provide valid arguments and be positive
Sleutel is offline  
Old 06/17/2014, 21:17   #12
 
elite*gold: 0
Join Date: Dec 2013
Posts: 125
Received Thanks: 129
I think that your source code will be useful for "coders", so... They should say thank you for this release.
lKasma is offline  
Thanks
1 User
Old 06/17/2014, 22:18   #13



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
Quote:
Originally Posted by Sleutel
It's very destructive if you tell that someone code is bad
Actually it's quite the opposite. I said his code is bad but I also told him how to improve it.



Quote:
Originally Posted by Sleutel
You should read a couple articles before you claim that code his code is bad
So you are suggesting that my advice is wrong?

Quote:
Originally Posted by Sleutel
I know there are many solutions for solving problems but remember your solution isn't always the best.
My proposed solution is the best one I know. If you find a better solution that's fine but one thing I can say for sure: My solution is better than his solution.

Quote:
Originally Posted by Sleutel
In my opinion is it good code because he wrote working code for the little knowledge he has of PHP. [...] He did a great job of programming this.
It's bad code. If he has little knowledge of PHP he should be glad I give him advice. There's nothing wrong in giving advice.

Quote:
Originally Posted by Sleutel
Your argument is invalid since you generalize it and second you are aiming for me instead of my argument I gave. If you really want to discuss this then at least provide valid arguments and be positive
What argument?

And why did you post a video about micro optimization again?
+Yazzn is offline  
Old 06/17/2014, 23:26   #14
 
elite*gold: 0
Join Date: Jun 2014
Posts: 22
Received Thanks: 14
Well, my purpose was to make it working, not for making it 100% perfect coding, but i just posted here to share so you can avoid to be dependent from other websites (except the nexoneu of course)

You can use it storing everyday new searches (like the old warrock stats) so you will have your own database with all users informations.

So if the nexon eu website its offline or under maintenance you will not get any error
__Buffer is offline  
Old 06/18/2014, 10:53   #15
 
Sleutel's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 748
Received Thanks: 569
Quote:
Originally Posted by Peter File View Post
So you are suggesting that my advice is wrong
I didn't say your advice is wrong but the way you did it. I'm not talking about your first post but I'm talking about your second one. It's very rude to tell someones code is bad in the way you did it.
Sleutel is offline  
Reply


Similar Threads Similar Threads
[GESUCHT]... Suche Profile für Demonbuddy !!! ... Level und Farm profile !!!
06/16/2012 - Diablo 3 - 11 Replies
Thread sagt alles... /PM me !
How to change your profile to another account's profile-Hack
09/23/2011 - Need for Speed World - 2 Replies
Really how to do?? :handsdown: not permanent,visual!! with CE or ARTMONEY and how??? :handsdown::handsdown::handsdown::handsdown:
Pirox profile -> sgather profile?
03/05/2011 - WoW Bots - 12 Replies
Hey.. ist es möglich die Pirox profile fürs farmen in sgather profile umzuwandeln? oder umgekehrt? Grüße ;)
all dummy mission and new hairstyle...reset profile.. profile
10/09/2010 - Facebook - 12 Replies
All mission are dummy new hairstyle.. new update reset profile for free user.. add all files to fiddler.. clear cache.. play NS... Free File Hosting & Video Downloads, Free File Sharing, Online Friends Network - Ziddu



All times are GMT +1. The time now is 14:00.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.