var headersData, admiralChecked = false; function getHeaders() { if (headersData === undefined) { var req = new XMLHttpRequest(); req.open('GET', location, false); req.send(null); // associate array to store all values headersData = new Object(); // get all headers in one call and parse each item var headers = req.getAllResponseHeaders().toLowerCase(), aHeaders = headers.split('\n'); for (var i= 0; i < aHeaders.length; i++) { var thisItem = aHeaders[i], key = thisItem.substring(0, thisItem.indexOf(':')), value = thisItem.substring(thisItem.indexOf(':') + 1); headersData[key] = value; } } } function getCFRay() { var result = 'admiral'; getHeaders(); if (headersData['cf-ray'] !== undefined && headersData['cf-ray'].length > 0) { result = headersData['cf-ray'].split('-')[1]; } else if (headersData['x-served-by'] !== undefined && headersData['x-served-by'].length > 0) { result = headersData['x-served-by']; } return result; } /** * Read Admiral cookie value * @param {string} status */ function readAdmiralCookie() { var cookieArray = document.cookie.split(/; */), ciphertextArray = [], isValid = false, matched = false, plaintext = '', cookieName, bytes, i; for (i = 0; i < cookieArray.length; i++) { ciphertextArray = cookieArray[i].split('='); if (ciphertextArray.length > 0) { bytes = CryptoJS.AES.decrypt(ciphertextArray[0].replace(/@[email protected]/g, '='), getCFRay()); try { plaintext = bytes.toString(CryptoJS.enc.Utf8); isValid = true; } catch { isValid = false; } if (isValid && plaintext.length > 0 && plaintext === (getCFRay() + navigator.userAgent).trim()) { cookieName = ciphertextArray[0] + '='; matched = true; break; } } } if (matched) { var char = cookieArray[i]; if (char.indexOf(cookieName) === 0) { var result = char.substring(cookieName.length, char.length).replace(/@[email protected]/g, '='), decrypted = CryptoJS.AES.decrypt(result, getCFRay()), data = { 'key' : cookieName, 'val' : 'false' }; if (decrypted.toString(CryptoJS.enc.Utf8) === (navigator.userAgent + getCFRay() + '1').trim()) { data['val'] = 'true'; } return data; } } return null; } /** * Save Admiral subscribed status to cookie * @param {string} status */ function updateAdmiralCookie(cipherValue, existingCookie) { var date = new Date(), valuePlainText = cipherValue.replace(/=/g, '@[email protected]'), admiralCookie; if (existingCookie !== null) { admiralCookie = existingCookie + valuePlainText; } else { var title = (getCFRay() + navigator.userAgent).trim(), titleCipher = CryptoJS.AES.encrypt(title, getCFRay()).toString(), titlePlainText = titleCipher.replace(/=/g, '@[email protected]'); admiralCookie = titlePlainText + '=' + valuePlainText; } date.setTime(date.getTime() + (10 * 60 * 1000)); admiralCookie += '; expires=' + date.toUTCString() + '; path=/'; document.cookie = admiralCookie; } checkAdmiralCookiePromise = new Promise(function (resolve, reject) { var cookieData = readAdmiralCookie(); if (cookieData !== null && cookieData['val'] === 'true') { resolve('subscribed'); } else if (window.admiral) { var checkAdmiralStatusPromise; if (window.location.host.replace(/^((sbx)|(dev)|(stg)|(www))\./, '') === 'forums.playstationlifestyle.net') { checkAdmiralStatusPromise = new Promise(function (resolve, reject) { if (typeof window.admiral !== 'undefined') { window.admiral("after", "measure.detected", function({ adblocking, whitelisted, subscribed }){ if (subscribed) { resolve('measure.subscribed'); } else { reject('measure.unsubscribed'); } }); } }); } else { checkAdmiralStatusPromise = new Promise(function (resolve, reject) { setTimeout(function () { reject('resolve'); }, 0); }); } checkAdmiralStatusPromise.then(function () { var cookieName = null; if (cookieData !== null) { cookieName = cookieData['key']; } updateAdmiralCookie(CryptoJS.AES.encrypt((navigator.userAgent + getCFRay() + '1').trim(), getCFRay()).toString(), cookieName); resolve('subscribed'); }) .catch(function (resp) { var cookieName = null; if (cookieData !== null) { cookieName = cookieData['key']; } updateAdmiralCookie(CryptoJS.AES.encrypt((navigator.userAgent + getCFRay() + '0').trim(), getCFRay()).toString(), cookieName); reject('unsubscribed'); }); } }); checkAdmiralCookiePromise.then(function () { console.info("[ADMIRAL] User Subscribed."); }).catch(function (resp) { console.info("[ADMIRAL] User Not Subscribed."); }); -->

New member here in the Forum. Hello everyone!

Discussion in 'New User Center' started by Beiraru, Dec 2, 2015.

  1. Beiraru

    Beiraru PSLS Level: Newbie

    Joined:
    Dec 2, 2015
    Messages:
    6
    Likes Received:
    0
    PSN:
    [US Acct] Vyrril, [HK Acct] Fuia_17
    Hello and good day... or night. I am kinda new to this forum thingy and I thought I should introduce myself.

    I am Bilal, and I am from Philippines. Almost all my friends in real life is a fakes so I resumed from indulging myself in games and animes.

    That's all, LOL, thank you for reading :)
     
  2. Stephen Bitto

    Stephen Bitto Administrator Staff Member

    Joined:
    Feb 12, 2015
    Messages:
    321
    Likes Received:
    54
    PSN:
    TYLERxDURDEN
    Welcome to the PSLS Forums!

    What consoles do you game on?
     
  3. Beiraru

    Beiraru PSLS Level: Newbie

    Joined:
    Dec 2, 2015
    Messages:
    6
    Likes Received:
    0
    PSN:
    [US Acct] Vyrril, [HK Acct] Fuia_17
    Our PS1 broke when I was still 8 years old. I played a lot of fighting and shooting games in it like Syphon Filter, Evil Zone, Tekken, and Street Fighter (maybe? IDK)

    I also have a PS3 and I played Gran(d??) Turismo even though I suck at it. Assassin's Creed, Red Dead Redemption, Tekken 6(?), and UFC something.

    I ordered a PSVita as a gift for myself, I can't wait for it to arrive :3
     
  4. Stephen Bitto

    Stephen Bitto Administrator Staff Member

    Joined:
    Feb 12, 2015
    Messages:
    321
    Likes Received:
    54
    PSN:
    TYLERxDURDEN
    Sounds awesome! The community here has played just about everything out there so if you're looking for recommendations you've come to the right place!

    PS: You're in for a real treat with the Vita. Most underrated piece of hardware out there!
     
    Beiraru likes this.
  5. Beiraru

    Beiraru PSLS Level: Newbie

    Joined:
    Dec 2, 2015
    Messages:
    6
    Likes Received:
    0
    PSN:
    [US Acct] Vyrril, [HK Acct] Fuia_17
    Thanks! I guess I'll keep those in mind :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice