Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 03:12

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

Advertisement



Help NPP Cookie

Discussion on Help NPP Cookie within the WarRock forum part of the Shooter category.

Reply
 
Old 04/30/2014, 20:47   #16
 
elite*gold: 26
The Black Market: 288/1/0
Join Date: Dec 2010
Posts: 4,343
Received Thanks: 2,395
Quote:
Originally Posted by -ToXiiC View Post
foreach(Cookie cookie in request.CookieContainger.getCookies("url"))
{
if(cookie.Name == "NPP")
{
this.NPP = cookie.Value;
break;
}
}
hahah simplest way
Ok. you are right
hero9910 is offline  
Old 04/30/2014, 21:05   #17
 
elite*gold: 20
Join Date: Mar 2014
Posts: 50
Received Thanks: 31
Simplest and better.
-ToXiiC is offline  
Old 04/30/2014, 21:47   #18
 
elite*gold: 0
Join Date: Jul 2013
Posts: 274
Received Thanks: 186
[METHODE TOXIIC] Exec Time:00:00:00.1097790
[METHODE hero9910] Exec Time:00:00:00.1505206

Execution time of 50000 runs.
However single time:
[METHODE TOXIIC] Exec Time:00:00:00.0000281
[METHODE hero9910] Exec Time:00:00:00.0000274

No way is better, both equal in speed at single run times.

Test function:

Quote:
static void Main(string[] args)
{
string res;
var stopWatch1 = new Stopwatch();
var stopWatch2 = new Stopwatch();
TimeSpan executionTime1 = new TimeSpan();
TimeSpan executionTime2 = new TimeSpan();
CookieContainer cookiecontainer = new CookieContainer();
Uri target = new Uri("http://test");
cookiecontainer.Add(new Cookie("test", "testast") { Domain = target.Host });
cookiecontainer.Add(new Cookie("NKK", "###") { Domain = target.Host });
cookiecontainer.Add(new Cookie("NPP", "NPPBLA124214124124") { Domain = target.Host });
for (int i = 0; i < 1; i++)
{
stopWatch1.Start();
foreach (Cookie cookie in cookiecontainer.GetCookies(target))
{
if (cookie.Name == "NPP")
{
res = cookie.Value;
break;
}
}
stopWatch2.Stop();
executionTime1 += stopWatch1.Elapsed;


stopWatch1.Reset();

stopWatch2.Start();
foreach (Cookie cookie in cookiecontainer.GetCookies(target))
{
if (cookie.ToString().Contains("NPP="))
{
res = cookie.ToString().Split(new char[] { '=' })[1];
break;
}
}
stopWatch2.Stop();
executionTime2 += stopWatch2.Elapsed;

stopWatch2.Reset();
}
Console.WriteLine("[METHODE TOXIIC] Exec Time:" + executionTime1);
Console.WriteLine("[METHODE hero9910] Exec Time:" + executionTime2);
Console.ReadLine();
}
wa-sta is offline  
Old 04/30/2014, 22:12   #19
 
elite*gold: 20
Join Date: Mar 2014
Posts: 50
Received Thanks: 31
Hehe man your code is a full ****

Use this..

request.Proxy = null; // Boost up!



Than you can see how it takes, try this with my method

Btw your NPP grab is bad coded
-ToXiiC is offline  
Old 04/30/2014, 22:20   #20
 
elite*gold: 0
Join Date: Jul 2013
Posts: 274
Received Thanks: 186
Quote:
Originally Posted by -ToXiiC View Post
Simplest and better.
Quote:
Originally Posted by -ToXiiC View Post
Hehe man your code is a full ****

Use this..

request.Proxy = null; // Boost up!



Than you can see how it takes, try this with my method

Btw your NPP grab is bad coded

Its a benchmark script of your function?
Do you even read the code?
wa-sta is offline  
Thanks
1 User
Old 04/30/2014, 23:38   #21
 
ToxicData's Avatar
 
elite*gold: 32
Join Date: Dec 2009
Posts: 937
Received Thanks: 1,307
He is just a stupid kid, ignore him wa-sta.
ToxicData is offline  
Thanks
1 User
Old 05/01/2014, 18:34   #22
 
elite*gold: 20
Join Date: Mar 2014
Posts: 50
Received Thanks: 31
Quote:
Originally Posted by ToxicData View Post
He is just a stupid kid, ignore him wa-sta.
:'( should i cry? u'r ridicolous, over-ego
-ToXiiC is offline  
Old 05/02/2014, 03:56   #23


 
Maurice's Avatar
 
elite*gold: 98
Join Date: Nov 2011
Posts: 1,267
Received Thanks: 1,019
Quote:
Originally Posted by -ToXiiC View Post
:'( should i cry? u'r ridicolous, over-ego
Hmm Ic.. people get a lil frusty :')



Both way's work and both way's seem to be fast enought to not stuck your program, good game nice try next time better..
Maurice is offline  
Reply


Similar Threads Similar Threads
PHP Cookie
10/09/2012 - Web Development - 5 Replies
Servus, ich hab mal vor längerer Zeit eine Klasse für Cookies geschrieben. Wollte es grad testen, funktioniert aber nur bedingt. Unter Firefox wird das Cookie normal gesetzt, unter Chrome jedoch nicht. Dies funktioniert jedoch einwandfrei: setcookie ("test", "value");
Cookie Fix
06/28/2012 - DarkOrbit - 1 Replies
So all you have to do is use Google Chrome. And use incognito mode. What this does is No save cookies? No bad



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


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.