featured
VMclone
Want to clone a VMware ESX VM but you don't have VirtualCenter?
Email mailto: and URL Javascript encoder
Protect your email address on a webpage without exposing it to spam harvesters.
PHP preg_find()
Ever found glob() just too limiting or want a really powerful, recursive, directory lister for PHP? preg_find() is the solution.
twitter.com/pgregg
pgregg: @SharonHodgsonMP And here I was thinking that only Tory MPs were involved in spanking sessions.
-
mar 201227
-
My OnLive Experience
Paul Gregg at 21:48 pm
In February BT posted an offer
(no longer on the BT web site) allowing customers in Northern Ireland
to buy an OnLive Gaming Console (MicroConsole) for £9.99 (normal price
£70) plus £6 shipping. Seemed like a good deal - and so I signed up (2
Feb 2012). Remember these prices - they are important as they come up
later.
Executive Summary:
I bought a MicroConsole device from OnLive, that is faulty.
OnLive
is failing to uphold consumer's Statutory rights in the UK. And even
goes to far as to explicitly deny those rights to consumers, itself a
criminal offense in the UK. I have been denied a refund of a defective
unit on the grounds that the unit was free and all I paid was postage
(which is incorrect).
OnLive's website states "No refunds" - a criminal offense in the UK.
Onlive
have stated that my MicroConsole was free, and I only paid shipping
costs. And shipping costs will not be refunded. *wrong*
OnLive are
also denying Sale of Goods Act by saying that I only have 7 days to
cancel and that I agreed to this in the Terms of Service. This relates to the Distance Selling Regulations and not to faulty goods under the Sale of Goods Act.
I am of the
opinion that I acted reasonably and gave OnLive sufficient time to
rectify the problem. I also believe, given the time lines showing that
the hardware never worked, that I can not, in law, be deemed to have
accepted the goods, and so have a lawful right to fully reject them, and
obtain a full refund for all monies paid.
I don't want to criticise OnLive Technical Support, just their Customer Service policies.
Timeline: I will update the timeline below as things develop.
I
received the MicroConsole the week of February 18 (not sure exactly
what date) and attempted to use it, however it was nothing like the
experience received when playing on the PC. The PC was reasonably quick
and responsive and I would estimate ran at maybe 15fps which was
reasonable for streaming videogame over the internet. The MicroConsole
on the otherhand was laggy, and I achieved maybe 3 to 4 fps. In short,
the game (Dirt 3) was unplayable.
I opened a Support ticket February 18. And so the saga begins.
My original support request:
02/18/2012 05:18 PM (timestamps from OnLive support portal)
I have attempted to set up my MicroConsole and am able to connect to the service.
However any time I attempt to play/start HomeFront game, the MC crashes and reboots.
Attempting to play Dirt3 results in a game running at approx 4 frames per second.
Playing Homefront on my PC is fine.
The MC constantly pops a message in the top right complaining of network problems - but the fact my PC works fine, shows the network is fine.
http://www.speedtest.net/result/1782184455.png
My home is wired for Gbit ethernet, and the MC is plugged into that. I've tried an alternative ethernet cable - no difference.
Even the intro screen/animation on the MC is blocky and just looks wrong.
I'm beginning to think I got a bad MC as I have never been able to play a game on it.
Thanks,Within an 80 minutes I had a reply, excellent. Except it is a standardised get-more-info affair. Fair enough I suppose: 02/18/2012 06:40 PM
PG.
Greetings PG,
Thank you for contacting OnLive. To help our team troubleshoot the issue, please provide the following information:
- In what country are you located?
- What is the name of your Internet Service Provider?
- Is an error message displayed when you connect? If so, what is the message?
- What are the results of the broadband quality test from http://www.pingtest.net? *
- What are the results of the Internet connection test from http://www.speedtest.net? *
- What is the brand and model of the cable or DSL modem used in your home network?
- What (if any) is the brand and model of the router used in your home network?
- Are you behind a firewall and/or are any antivirus applications running?
- Are you using a Wireless (Wi-Fi) or Wired router?
If Wi-Fi, please check for interference:
- Are you the only person currently on network (using the Internet), or are other members of your household sharing the connection?
- If you have a smartphone, is it configured to share your Wi-Fi network?
* For best results, choose the server closest to your location:
US
-- East Coast --> Washington D.C.
-- West Coast --> San Francisco, CA
-- Midwest --> Dallas, TX
UK
-- London
Best regards,
Realiana
Customer Service Representative
http://support.onlive.com/
So I respond to each of the questions: 02/19/2012 06:13 AM
In what country are you located?
UK
- What is the name of your Internet Service Provider?
BT
- Is an error message displayed when you connect? If so, what is the message?
No error message.
- What are the results of the broadband quality test from http://www.pingtest.net? *
http://www.pingtest.net/result/57209759.png
- What are the results of the Internet connection test from http://www.speedtest.net? *
http://www.speedtest.net/result/1782184455.png
- What is the brand and model of the cable or DSL modem used in your home network?
BT Supplied HomeHub3 (I believe) - supplied with the BT Infinity service.
- What (if any) is the brand and model of the router used in your home network?
Same device as the BT HomeHub3
- Are you behind a firewall and/or are any antivirus applications running?
No - just the BT HomeHub.
- Are you using a Wireless (Wi-Fi) or Wired router?
BT HomeHub does Wifi - but I am not using Wifi. I have Gbit Cat5e wired ethernet connections to all devices, including the MC.
If Wi-Fi, please check for interference:
No interference. The BT HomeHub3 is supposed to scan and pick the best channel with no interferences. However, the issue is moot - my nearest neighbour is 100m away and using my phone's (android app) Wifi Analyser, I am the only wifi network it can see.
- Are you the only person currently on network (using the Internet), or are other members of your household sharing the connection?
At the times of testing, I am the only one using the network.
- If you have a smartphone, is it configured to share your Wi-Fi network?
No.
Thanks,The following Wednesday I get a holding email: 02/22/2012 12:09 PM
PG
Hello,
Thank you for the information. I will forward your inquiry to our Technical Team for further assistance, They will contact you via email as soon as they are able.
Thank you for your patience. Have a lovely day!
Best regards,
RealianaAnd so I wait another 2 days to receive: 02/24/2012 02:23 PM
Customer Service Representative
http://support.onlive.com/
Hello,
Your issues may have to do with a couple of things. I saw that you had run a speed test, but we would like it if you could run the test to London.
Can you please run a test for me at www.speedtest.net and find the white dot that represents London. Click on that dot and start the test. When the test finishes, please click on Share This Result, then click Copy and paste the results here.
Best regards,
Berret
OnLive Technical Support
http://support.onlive.com
2 days later, I reply: 02/26/2012 04:41 PM
Hi,02/28/2012 04:22 PM:
Here are some results from London based speedtests that I ran just now.
http://www.speedtest.net/result/1798764992.png
http://www.speedtest.net/result/1798810091.png
http://www.speedtest.net/result/1798812080.png
http://www.speedtest.net/result/1798812973.png
Thanks,
PG
Hello,
Thank you very much for providing those links for me. Is this issue only on your MicroConsole, or do you notice issues on you computer as well?
Best regards,
Berret
OnLive Technical Support
http://support.onlive.com
02/28/2012 06:26 PM
Hi,03/01/2012 10:26 AM
No. PC play seems to be working well.
Thanks,
PG
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Hey PG,
I am trying to do some research into why you are having this experience on your MicroConsole only. Can you try and run a few more sessions on the device, so we can get some details? When I look up your previous sessions, they are understandably computer ones for the most part.
I appreciate the help in figuring out your issue.
Best regards,
Berret
OnLive Technical Support
http://support.onlive.com
Now, somehow I did not get this email :( but on Monday 5th I got a notification that the ticket was closed because I did not reply.
From: OnLive Support [mailto:support@onlive.com]
This ticket has been closed because we have not heard back from you in 3 days. This is an automated message, but you can re-open the ticket at any time by replying to this email.
Sent: 05 March 2012 08:22
Subject: MC blocky and crashes. [Incident: 120218-000143]
I replied saying I didn't get the earlier message, assuming it would reopen the ticket.
It didn't, but I was not aware of that and several days later I logged into the web site to find the ticket still closed :( So I open another ticket.
03/20/2012 05:33 PM
Unfortunately you did not solve 120218-000143.
I did not receive the message just before you closed the ticket and so was surprised when the ticket was closed.
In your message about closing it you state:
"This ticket has been closed because we have not heard back from you in 3 days. This is an automated message, but you can re-open the ticket at any time by replying to this email."
Unfortunately this is not true because I did reply to this email with further information but this did not reopen the ticket. Now when I look at the ticket online, it says I can not reopen the ticket.
So with that complaint out of the way...
I wish to request a refund for this MC because it simply does not perform the function to which it is supposed to do.
Please advise as to the correct process to follow to achieve this.
Thank you
Paul Gregg
It was then I spotted on their web site the message "No refunds" and so sent a followup:
03/20/2012 06:14 PM
Oh - I just saw this:
What if I change my mind, and want to return the OnLive Game System or an accessory?
All purchases are final. No refunds.
Find comprehensive support information at: OnLive Game System.
FYI - Not only is this term unlawful - OnLive is *committing* a criminal offense in the UK.
Under the Consumer Protection from Unfair Trading Regulations 2008 it is also a criminal offence to mislead a consumer about his/her legal rights. Examples might include stating 'no refunds' or 'sold as seen'.
The picked it up again: 03/21/2012 04:02 PM
Hello,
Thank you for contacting us again, I apologize you had not seen my previous message. I would happy to continue to troubleshoot your issue with you if you are still having a bad experience. If you would like to pursue a refund, you are correct that our policy is that all sales are final, but we can escalate you to our billing department to review your request.
Please let us know how you would like to proceed.
Best regards,
Berret
OnLive Technical Support
http://support.onlive.com
03/21/2012 05:26 PM
Hi Berret,
Thank you for your reply.
I am at the point where I believe the MC is faulty because it crashes and reboots when I start a game.
I understand that you state all sales are final - however this is contrary to UK law as I noted - and by even displaying this notice you are committing a criminal offense in UK law. I trust you will rectify this. Further, under the Sale of Goods Act, goods must be of merchantable quality and fit for purpose. You've had over a month to try and make the MC
I bought work, without success, and I am within my legal right to demand a full refund. This is what I am invoking now.
1. You will provide a full refund for the faulty MC.
2. You will provide return postage, or collection service to return the faulty MC to you.
Thank you,
Paul Gregg
03/24/2012 06:58 PM
Hello,
I will escalate your request to the billing department, and they will explain the next steps to you. They will be in on Monday and will address your issue as quickly as they can.
Best regards,
Berret
OnLive Technical Support
http://support.onlive.com
03/26/2012 11:13 AM
Greetings,
Thank you for contacting OnLive.
We understand that you are requesting a refund for your OnLive Game System purchase..
In order to credit your account, please return the OnLive Gaming System to following address:
ATTN: OnLive Department
LGI Logistics Group International UK LTD
4 Clarendon Drive
Wymbush
Milton Keynes
MK8 8DA
After we receive the OnLive Game System, we will apply a refund to your account. If we do not receive the device within 10 days from this email date, you will not receive the refund.
If you have any other questions please feel free to ask.
Joseph
Warranty Department
http://support.onlive.com/
03/27/2012 08:32 AM
Hi Joseph,
Thank you for your message. However, I would request that you pick the returned item up from me as is my right under Sale of Goods Act for faulty goods.
To be clear - I am requesting a full refund (again under law) and NOT a "credit to my account".
The device is faulty and has never performed as advertised. As is evidenced by support tickets you can see in my account.
Quote:
http://www.oft.gov.uk/business-advice/treating-customers-fairly/sogahome/sogaexplained/
"In the case of faulty goods being returned because they are not fit for purpose do not match their description or are not of a satisfactory quality , the customer is entitled to claim the cost of postage from you or to request that you arrange collection of the item."
I will have the goods packaged in the original box available from my shipping address from Wednesday 28th March.
Thank you.
Paul Gregg
03/27/2012 11:31 AM
Greetings,
As mentioned in the terms of service that you agreed upon when you created your account it states that "All hardware sales subject to a 7-day right to cancel."
You are past the 7-day right to cancel.
The OnLive Game System you ordered was free and only the shipping cost was charged to your account. That cost was to pay to have the unit sent to you which it was. Shipping costs will not be refunded.
If the unit is defective, we have no problem exchanging the unit for you at no cost to you. Would you like for me to process an exchange for a brand new unit for you? I can even provide you with a free 5-day PlayPass to use on a game of your choice to try out the new system.
If you have any other questions please feel free to ask.
Joseph
Warranty Department
http://support.onlive.com/
03/27/2012 03:40 PM
Hi Joseph,
Thank you for your reply.
I would like to address each of your points in turn.
1. 7 day right to cancel:
"Notwithstanding the above, the purchase of an OGS or any other hardware will constitute the supply of goods, and you will have seven days (beginning the day after you receive the goods) in which you may choose to cancel the contract."
This quote relates to the Distance Selling Regulations within which I would have a legal right to return the goods, without reason, for a full refund.
This is NOT a DSR issue. I am attempting to return the Goods under the Sale of Goods Act as faulty. Not as described, not fit for purpose and not of satisfactory quality. Given the dates of my support tickets, it should be obvious that the MicroConsole was faulty when delivered. I also filed my first ticket with the 7 days of delivery which, again, signals to you that I have not "accepted" the Good in law.
2. "You are past the 7-day right to cancel."
Irrelevant for reasons stated in 1.
3. "The OnLive Game System you ordered was free and only the shipping cost was charged to your account. That cost was to pay to have the unit sent to you which it was. Shipping costs will not be refunded."
Incorrect. The offer was a discounted MicroConsole @ £9.99 and £ 6.00 shipping.
4. "If the unit is defective, we have no problem exchanging the unit for you at no cost to you"
Thank you for your offer. However, since the original contract in in breech under Sale of Goods Act - I am legally entitled to reject the good and request a full refund, including postage. In essence, I should not be out of pocket since the contract is void.
Further, since you appear to be relying on DSR "7 day" notice period -
Your attention is drawn to the Consumer Protection (Distance Selling) Regulations 2000, specifically to regulation 14 which states that you may not make any charge in relation to the supply of goods under a contract whereby the cancellation of the contract is due to the breach of implied terms of the contract (specifically implied terms in relation to section 14 of the Sale of Goods Act).
I therefore request that you reimburse both goods and postage fees in accordance with these regulations.
Regards,
PG
-
mar 201227
-
OnLive UK Terms of Service and Terms of Use, copy
Paul Gregg at 21:02 pm
Copy taken from http://www.onlive.co.uk/legal/termsofservice and http://www.onlive.co.uk/legal/index on March 27, 2012.
TERMS OF SERVICE
TERMS OF USE
ONLIVE, INC. TERMS OF USE AGREEMENT
As of September 22, 2011
Acceptance of Terms
This Terms of Use Agreement (the "Agreement") applies to certain websites of OnLive EMEA S.à r.l and its group of companies (collectively, "OnLive", "we", "our", or "us" or the "OnLive Websites"). By visiting, accessing, or using the OnLive Websites or any portion thereof , you agree that you have read, understood, and agree to be bound by this Agreement, whether or not you are a registered user of any of the OnLive Websites or any portion thereof.
We reserve the right to amend this Agreement at any time and without notice. If we do this, we will post the amended Agreement on this page and indicate at the top of the page the date the Agreement was last revised. Your continued use of the OnLive Websites after any such changes constitutes your acceptance of the new Terms of Use. If you do not agree to any of these terms or any future Terms of Use, do not visit, use or access (or continue to access) the OnLive Websites. This Agreement applies to all visitors, users, and others who access the OnLive Websites ("Users"). The Agreement incorporates by reference our Privacy Statement, or any supplemental terms, schedules, exhibits and related materials that are attached or referenced herein. It is your responsibility to review this Agreement from time to time for any changes as it creates a binding legal agreement between you and us. You do not have to register in order to visit the OnLive Websites. In the future, though, we may allow you to register with the OnLive Websites and create a "User" account.
Permission to Use the Site
Subject to all of the terms and conditions of this Agreement, you are hereby granted a non-exclusive, limited, personal licence to access the OnLive Websites and view our Content (as defined below). We reserve all rights not expressly granted herein in the OnLive Websites and the Content (as defined below). We may terminate this licence for convenience at any time at our sole discretion.
You agree not to engage in any of the following prohibited activities: (i) copying, distributing, or disclosing any part of the OnLive Websites in any medium, including without limitation by any automated or non-automated "scraping"; (ii) using any automated system, including without limitation "robots", "spiders", or "offline readers", to access the OnLive Websites in a manner that sends more request messages to our servers than a human can reasonably produce in the same period of time by using a conventional on-line web browser; (iii) transmitting spam, chain letters, or other unsolicited email; (iv) using any "bot", spider, site search/retrieval tool or utility, or any other manual or automated technique, to collect, extract, index, mine, or otherwise seek to obtain any data or information from OnLive, OnLive Websites, or any User, or in any manner compromise, degrade or circumvent the navigational structure or the presentation of the OnLive Websites, or the display or performance of the Content (as defined below) of the OnLive Websites; (v) attempting to interfere with, compromise the system integrity or security or decipher any transmissions to or from the servers running the OnLive Websites; (vi) taking any action that imposes, or may impose an unreasonable or disproportionately large load on our infrastructure (as determined at our sole discretion); (vii) uploading invalid data, viruses, worms, or other software agents through the OnLive Websites; (viii) collecting or harvesting any personally identifiable information from the OnLive Websites; (ix) using the OnLive Websites for any commercial solicitation purposes; (x) using the OnLive Websites or any Content or products obtained through the OnLive Websites for any resale or commercial use; (xi) collecting or using any product listings, descriptions, or prices on the OnLive Websites; (xii) impersonating another person or otherwise misrepresenting your affiliation with a person or entity, conducting fraud, hiding or attempting to hide your identity; (xiii) interfering with the proper working of the OnLive Websites; (xiv) bypassing the measures we may use to prevent or restrict access to the OnLive Websites; or (xv) disseminating any abusive, harmful, offensive or illegal content. We may permanently or temporarily terminate, suspend, or otherwise refuse to permit your access to the OnLive Websites without notice and liability for any reason, including if in our sole determination you violate any provision of this Agreement, or for no reason. You further understand and agree that OnLive has the right, but not the obligation, to remove in whole or in part any Content related to the OnLive Websites, including without limitation all data and Content residing on our servers, at any time at our sole discretion, with or without notice and with no liability to us of any kind.
The OnLive Websites or portions thereof are subject to scheduled and unscheduled site interruptions. All aspects of the OnLive Websites are subject to change or elimination at our sole discretion. We reserve the right to interrupt the OnLive Websites with or without prior notice for any reason or no reason. You agree that OnLive is not liable to you for any interruption of the OnLive Websites or any portion thereof, or any delay or failure to provide the OnLive Websites or any portion thereof.
Our Proprietary Rights
The OnLive Websites and all materials therein or transferred thereby, including, without limitation, software, images, text, graphics, illustrations, logos, trademarks, trade names, photographs, audio, videos, and music (the "Content"), and all Intellectual Property Rights related thereto, are the exclusive property of OnLive and our licensors.
Except as explicitly provided herein, nothing in this Agreement shall be deemed to create a licence in or under any such Intellectual Property Rights, and you agree not to sell, licence, rent, modify, distribute, copy, reproduce, transmit, publicly display, publicly perform, publish, adapt, edit or create derivative works from any materials or Content accessible on the OnLive Websites. Use of the Content or materials on the OnLive Websites for any purpose not expressly permitted by this Agreement is strictly prohibited.
For the purposes of this Agreement, "Intellectual Property Rights" means all patent rights, copyright rights, mask work rights, moral rights, rights of publicity, trademark, trade dress and trade name rights, service mark rights, goodwill, trade secret rights and other intellectual property rights as may now exist or hereafter come into existence, and all applications therefore and registrations, renewals and extensions thereof, under the laws of any state, country, territory or other jurisdiction worldwide.
Eligibility/Representations and Warranties
You shall be solely responsible for your use of the OnLive Websites and all activity undertaken by you while visiting the OnLive Websites.
This OnLive Websites are intended solely for Users who are thirteen (13) years of age or older, and any use or access to the OnLive Websites by anyone under thirteen (13) is unauthorized, unlicensed, and in violation of this Agreement. In connection with your use of the OnLive Websites, you affirm, represent and warrant, in addition to the other representations and warranties in this Agreement, the following: You are at least thirteen (13) years of age.
You must be at least eighteen (18) years of age to register for an account on the OnLive Service. In connection with registering for an OnLive account, you affirm, represent and warrant, in addition to the other representations and warranties in this Agreement, the following: You are at least eighteen (18) years of age, or if you are under 18 years of age you are an emancipated minor and are fully able and competent to enter into the terms, conditions, obligations, affirmations, representations, and warranties set forth in this Agreement, and to abide by and comply with this Agreement.
Privacy
We care about the privacy of our Users. Click here to view our Privacy Statement, which is incorporated by reference in this Agreement as if it is fully set forth herein. By using the OnLive Websites, you are consenting to have your personal data transferred to and processed in the United States.
Your use of the Site may be subject to use by us of "cookies", which are text files placed on your computer to temporarily store information. Our use of cookies is subject to the Privacy Statement.
Third-Party Websites, Advertisers or Sites: As set forth in our Privacy Statement, the OnLive Websites may contain links to third-party websites, advertisers, or sites that are not owned or controlled by us. We have no control over, and assume no responsibility for, the content, privacy policies, or practices of any third party websites. If you access a third party website from the OnLive Websites, you do so at your own risk, and you understand that this Agreement and our Privacy Statement do not apply to your use of such sites. To the fullest extent permissible by law, you expressly relieve us from any and all liability arising from your use of any third-party website or third party owned content. Additionally, your dealings with or participation in promotions of advertisers that may be found on the OnLive Websites, including payment and delivery of goods, and any other terms (such as warranties) are solely between you and such advertisers. You agree that we are not responsible for any loss or damage of any sort relating to your dealings with such advertisers.
We encourage you to be aware of when you leave the OnLive Websites, and to read the terms and conditions and privacy policy of any third-party website that you visit.
Indemnity
You agree to defend, indemnify and hold harmless OnLive, and its subsidiaries, agents, managers, partners, suppliers, advertisers, product and OnLive Website providers, and other affiliated companies, and their employees, contractors, agents, officers and directors, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, and expenses (including but not limited to attorneys' and experts' fees) arising from: (i) any infringement of OnLive's Intellectual Property Rights by you; (ii) your violation of any third-party right, including without limitation any right of privacy, publicity rights or Intellectual Property Rights; and (iii) your violation of any law, rule or regulation of the UK or any other country.
No Warranty
The OnLive Websites are provided on an "as is" and "as available" basis. Use of the OnLive Websites is at your own risk. To the extent permitted by law, OnLive Websites are provided without warranties of any kind, whether express or implied. Without limiting the foregoing, OnLive, its subsidiaries, and its licensors do not warrant that the operation of the OnLive Websites or the information, content, materials, or products included on the OnLive Websites is accurate, reliable or correct; that the OnLive Websites will meet your requirements; that the OnLive Websites will be available at any particular time or location, uninterrupted or secure; that any defects or errors will be corrected; or that the OnLive Websites are free of viruses or other harmful components. Any information, content, materials, or products downloaded or otherwise obtained through the use of the OnLive Websites is obtained at your own risk and you will be solely responsible for any damages or losses, including damage to your computer system or loss of data, that result from such procurement.
OnLive does not warrant, endorse, guarantee, or assume responsibility for any product or websites advertised or offered by a third party through the Onlive Websites or any hyperlinked website or site, or featured in any banner or other advertising, and OnLive will not be a party to or in any way monitor any transaction between you and third-party providers of products or sites.
Limitation of Liability
OnLive will not be responsible for any damage, loss or expense resulting from hacking, tampering or other unauthorized access or use of the Onlive Websites or your account or the information contained therein.
To the extent permitted by law, in no event shall Onlive (or any of its affiliates or licensors) nor any of the officers, directors, employees, shareholders, licensors, customers, agents or representatives of Onlive have any liability of any kind or nature to you or any third party for any indirect, incidental, consequential, special, or punitive damages whatsoever (including, but not limited to, damages for any loss of profits or loss of any confidential or other information or for business interruption) arising out of or in any way relating to your use of the OnLive Websites (including an inability to access or use the OnLive Websites) or otherwise with respect to this Agreement, whether arising in tort (including negligence), contract, strict liability or otherwise, whether or not you have advised of the possibility of any such loss or damage.
OnLive will not be liable for any liability associated with infrastructure (including, without limitation, the internet), devices and software outside of OnLive's control such as computers, displays, televisions, input devices, switches, routers, firewalls, operating systems, and browsers.
Nothing in this Agreement will exclude or limit either party's liability for (i) fraud or fraudulent misrepresentation; (ii) death or personal injury caused by its negligence (iii) under the indemnity in clause 6 above; or (iv) any other liability which cannot be excluded by law.
Export Control
You may not use, export or re-export any Content or any copy or adaptation of such Content, or any product or service offered on the OnLive Websites, in violation of any applicable laws or regulations, including, without limitation, UK export laws and regulations. The OnLive Websites are controlled and operated from facilities in the UK. We make no representations that the OnLive Websites or any portions thereof are appropriate or available for use in other locations. Those who access or use the OnLive Websites from other jurisdictions do so of their own volition and are entirely responsible for compliance with all applicable UK and local laws and regulations, including but not limited to export and import regulations. You may not use the OnLive Websites if you are a resident of a country embargoed by the UK, or are a foreign person or entity blocked or denied by the UK government.
Assignment
This Agreement, and any rights and licenses granted hereunder, may not be transferred or assigned by you, but may be assigned by us without restriction.
General
-
Governing Law and Legal Actions. You agree to handle any disputes between you and OnLive in accordance with the policy outlined below, the OnLive Privacy Policy or as otherwise agreed in writing between you and OnLive. As an alternative to litigation, OnLive will consider reasonable requests to resolve any dispute through dispute resolution procedures such as arbitration or mediation.
The construction, validity and performance of this Agreement and all non-contractual obligations arising from or connected with this Agreement, the OnLive Privacy Statement, the OnLive Community Guidelines or the service shall be governed by English law. Any action or proceeding brought to adjudicate any dispute related to this Agreement, the OnLive Privacy Statement, OnLive Community Guidelines, or the service shall be subject to the non-exclusive jurisdiction of the English courts, except as otherwise agreed by the parties in writing.
If you breach or indicate your intention to breach this Agreement (including, without limitation, in a manner that infringes, misappropriates or violates any Intellectual Property Rights or privacy rights or may cause irreparable or continuing harm), OnLive may seek injunctive relief against you, or any other remedy available under applicable law
-
Notification Procedures. We may provide notifications, whether such notifications are required by law or are for marketing or other business related purposes, to you via email notice, written or hard copy notice, or through conspicuous posting of such notice on our website, as determined by us in our sole discretion. We reserve the right to determine the form and means of providing notifications to our Users.
-
Entire Agreement/Severability. This Agreement, together with our Privacy Statement and any other legal notices and agreements published by us via the OnLive Websites, shall constitute the entire agreement between you and OnLive concerning the OnLive Websites. If any provision of this Agreement is deemed invalid by a court of competent jurisdiction, the invalidity of such provision shall not affect the validity of the remaining provisions of this Agreement, which shall remain in full force and effect.
-
No Waiver. No waiver of any term of this Agreement shall be deemed a further or continuing waiver of such term or any other term, and OnLive's failure to assert any right or provision under this Agreement shall not constitute a waiver of such right or provision.
-
aug 201125
-
Amusing, True Near Death Experience.
Paul Gregg at 23:49 pm
Those who know me will know that there have been two important events occurring in my life this week. 1) Tiling my kitchen, and 2) Trying to buy a HP TouchPad.
As part of tiling the kitchen, significant other wanted to replace all the standard white wall sockets with Stainless Steel ones to match the rest of the kitchen colour scheme. I was safely over half way through this task, having disconnected the socket mains supply, when a van pulled up bearing HP TouchPad goodness. Thus the next 30 minutes of my life was accounted for.
Upon returning to the kitchen tasks I came to the Cooker 40A switch. I disconnected the ring main from the switch and proceeded to move the wires so that I kept the supply and load pairs apart when BUZZZZZZ and 240 Volts of high energy goodness shot through my hand and up my arm.
Yes folks, TouchPad caused me to forget to flip the cooker ring circuit in the fuse box.
Cue me jumping back, dropping tools and collapsing to the floor in a bout of Arrrrgh.
Wife said "Stop it, you'll scare the kids.".
Kids run in asking what happened and wife explains that Daddy electrocuted himself.
Six year old Lauren asked "Could you see his bones?".
-
apr 201111
-
What 16TB raw space looks like at home
Paul Gregg at 17:40 pm
I've been looking for some home backup solutions over the past couple of months. This has led me down both the do-it-yourself route and buying a ready-made solution.
One of my requirements was that I wanted the solution to be more than just storage - otherwise I would have purchased a straight NAS box from the likes of Qnap, Netgear or if feeling rich Drobo. Most of these dedicated NAS boxes can be "rooted" to allow ssh access , however their CPUs are generally underpowered for general purpose use.
Other requirements were that I wanted a reasonably small form factor and to be able to use at least 4 SATA hard drives, preferably with hot swap ability. Hardware raid was not a requirement because I intended on using a Linux distribution with mdadm software raid.
In the end, I ended up building two boxes.
The first, a home build, based on the CFI A7879 chassis
with a Gigabyte GA-D525TUD Dual Core Atom Mini-ITX Board. ![]()
The CFI boot drive is a 8GB (30MB/sec) CompactFlash card mounted as an IDE drive. The HP boot drive is a 16GB Sandisk Cruzer USB stick.
Finally added 4 x 2TB Samsung F4EG HD204UI drives to each box.
The CFI box has 8TB in RAID5 providing 5.4TB usable. The HP has 8TB in RAID6 providing 3.6TB usable space.
If there is more interest, I'll write up the build process is more detail with pictures.
For now - here are some shots of my utility shelf.
-
jan 201119
-
Experts Exchange, Google, AllFAQ.org and misappropriation of copyright.
Paul Gregg at 21:50 pm
Opinion Piece
I was googling (as a verb) and came across a rather peculiar message at the bottom of Google's search results:
In response to a complaint we received under the US Digital Millennium Copyright Act, we have removed 1 result(s) from this page. If you wish, you may read the DMCA complaint that caused the removal(s) at ChillingEffects.org.
Interesting - never saw that before!
Following the link to Chilling Effects shows a copy of the complaint which has some interesting text in it.
Experts-Exchange makes a detailed itemisation of their registered Copyrights, none of which I find objectionable, however, the complaint then goes on to list several issues against the Defendant, the first and most egregious of which is:
a direct "copy and paste job" lifting the content of Plaintiff's question and answer forums and inserting them onto AllFAQ's website. AllFAQ's question and "Solutions" are verbatim to Experts-Exchange's questions and "Accepted Solutions;"
From this Experts Exchange is accusing allfaq.org of Copyright infringement against Experts Exchange owned Copyright.
At first glance, this might seem fully justified - but look at what they are claiming copyright on. Experts Exchange are assuming copyright ownership of content that you, and I, and all their users create by asking and answering questions on their web site.
I looked at Experts Exchange's Terms of Use and could not find any agreement that users were assigning their rights and copyrights to Experts Exchange. The relevant paragraph is:
"5. Content License
EXPERTS EXCHANGE enables Members to post problems or questions, proposed solutions or answers, information, comments and other content ("Your Content") to its Site. When you post Your Content to the Site, you understand and agree that Your Content can be viewed and used by other Members who visit the Site with or without attribution.
You represent and warrant that you own or otherwise control all of the rights to Your Content and that use of Your Content by EXPERTS EXCHANGE and its affiliates will not infringe upon or violate the rights of any third party. Before you use EXPERTS EXCHANGE Services to post any information or content that is protected by intellectual property laws, you shall have acquired the legal right to do so from the owner or authorized licensee of such information or content.
By registering with EXPERTS EXCHANGE and posting Your Content on the Site, you hereby: (i) grant EXPERTS EXCHANGE a non-exclusive, perpetual, irrevocable, unrestricted, transferable, fully sub-licensable, worldwide, royalty-free license to use, distribute, display, reproduce, perform, modify, adapt, publish, translate and create derivative works from Your Content in any form, media or technology, whether now-known or hereafter developed; (ii) grant EXPERTS EXCHANGE and its affiliates and sub-licensees the right to use the Member Name that you submit with Your Content for purposes of attribution; (iii) authorize EXPERTS EXCHANGE to assert and prosecute claims against any third-party making any unauthorized use of Your Content, including any use that violates this User Agreement ("Third-Party Claims"); and (iv) appoint EXPERTS EXCHANGE as your attorney-in-fact for the purpose of asserting and prosecuting Third-Party Claims. If you do not wish to have Your Content attributed to you, then you must notify EXPERTS EXCHANGE at customer_service@experts-exchange.com.
Experts Exchange acknowledges that the copyright belongs to the author as "Your Content" and that by posting you are granting them extensive licenses to use that content. You are not assigning your copyright to Experts Exchange.
Now I am glad that their ToU does not attempt to wrest copyright ownership from its rightful owner, that is right and proper.
allfaq.org is demonstrably guilty of screen-scraping the Experts Exchange web site and I do not condone those actions at all. However, looking at what they copied - it was the Title, Question and Accepted Solution text - the copyright of 100% of that is with the original authors, and not Experts Exchange.
Thus, in my opinion, this complaint against allfaq.org is without merit and should be dismissed.
It would also appear that Experts Exchange has also abused the provisions of the DMCA in forcing Google to remove the content. Google should restore the links.
And finally, Experts Exchange should implement some technical measures to prevent automated scraping. Find better ways to improve your search ranking, and if your competition beats you don't ask your own members how to do better SEO; be told by them that you have no Copyright Claims on the content; and then proceed to file DMCA take down notices when you know you have no (copy)right.
-
dec 201002
-
Stage 2: http:BL with Apache2 mod_perl
Paul Gregg at 11:19 am
After my earlier post Referrer and Comment spammers are a PITA I came up with two mod_perl plugins to Apache and an "apache level" firewall.
The reason for the apache-level firewall is two-fold. There is no direct way for the Apache user to manipulate an iptables chain (as it doesn't run as root), and second; I was not happy with suid root access or other forms of message passing to a daemon which would manipulate the firewall for me.
Architecture is thus, in httpd.conf place the following two lines:
PerlPreConnectionHandler PGREGG::httpBLBlockThe first tells apache to run the handler in my httpBLBlock.pm module when a connection is received (before the request has been sent by the client). In this handler, I am simply looking for a filename matching that IP in a directory that is writable by the apache user. The contents of the file are a SCORE:httpBL_answer:[LIST]. Based on this, the module checks the mtime of the filename is in the last SCORE days, then the firewall is in effect. If so, we simply tell apache to drop the connection. If the file has expired, we delete the file.
PerlLogHandler PGREGG::httpBLLog
The second line is more interesting, and what creates the firewall filenames. In order to not impede the general speed of request handling, processing is performed in the Logging section of the Apache process. Our module is called by apache after the response has been sent, but before the access_log entry has been written. In our module we perform the http:BL API call and compute the above SCORE based upon the Threat* level and Age* of the API response. (* both Threat and Age are octets in the DNS lookup). We merely discount the Threat down to zero based on the Age (0-255) where an entry 255 days old reduces the SCORE to zero.
If the SCORE is larger than our trigger level (3) then we create the firewall filename, log the entry in our own httpbl.log and return Apache2::Const::FORBIDDEN. This causes Apache to not log the entry in the normal access_log. Otherwise, if all is ok, we return Apache2::Const::OK and Apache logs the hit as normal.
I have a bit of code tidy up, restructure the config/firewall directory and pull some common code out to a shared module before I can release to the world.
An interesting side effect to publishing the last story out through Planet PHP and other news sources along with the Project Honey Pot image is that when browsers viewed those sources, they all asked for the image off my server. In several cases, these were known spammer, Comment spammer, and other abusers. My server then created the firewall entry blocking them before they were able to follow the links back to my server.
I have been reading up more on Apache Bucket Brigades in an attempt to allow the firewall filter to be placed immediately after the request has been received and allow a custom response to the browser. This may help an otherwise unsuspecting user if their machine had been trojaned. I don't mind admitting I'm thoroughly confused right now :)
-
nov 201028
-
Referrer and Comment spammers are a PITA.
Paul Gregg at 23:18 pm
This shouldn't be news to anyone - but Referrer and Comment spammers are a real pain in the a*se. Polluting my web logs and making any meaningful log analysis problematic.
So, I now have an itch to scratch and I'm going to do something about it. I would encourage you, the reader, to do something about it too.
Firstly, get yourself over to Project Honey Pot and read up on the project. If you can, set up a Honey Pot or two yourself. Also be sure to read about the http:BL - this works along similar lines to the DNS blacklists used for Email spammers.
Next, I'm going to write a general Apache mod_perl module which will provide integration (lookup) to the http:BL and allow the user to "action"* the abusers. Minimally, it will prevent the normal apache log files from being polluted by diverting the log entries to a httpbl logfile.
* "action" - To provide flexibility, I'm thinking of running an external script with the IP of the abuser. The script can then perform any action you wish. The one I'm going for is an iptables firewall block.
Comments and suggestions welcome.
Project Honey Pot has implementations for several languages, including PHP and Perl (the languages that mean most to me). There may be an implementation for your Web application so you might not be interested in what I'm doing at all :)
-
aug 201004
-
Vodafone UK + HTC Desire + Android 2.2 FroYo = Fail.
Paul Gregg at 18:59 pm
Well, it looks like Vodafone UK royally messed up the timing of the HTC Desire OTA Update yesterday. While most owners were eagerly expecting the announced Android 2.2 (FroYo) update that HTC have been pushing out, Vodafone decided to push out a 2.1-update1 which only provides Vodafone branding, apps, a few bugs, and even a couple of "adult" related bookmarks to everyone - and leaving them on Android 2.1 (Eclair).
Needless to say - Users are not happy at all. *Vodafone appears to have moved the thread here. [2010/08/06] Moved again to here (is Vodafone trying to hide the complaints?).
In work, we (coworkers and I) now have a total of 8 HTC Desires (out of 16 people) - even two iPhone users have converted! A few have been espousing the wonders of FroYo on their phone (some had rooted, and did it themselves, others had bought unbranded phones and got the stock HTC FroYo upgrade). I was jealous(ish) and wanted it myself.
Given Vodafone's actions yesterday, it was likely that the FroYo update from Vodafone was minimum several weeks away, if not 3 months (as was intimated on the Vodafone forum - end of October) - it was also noted that the Vodafone FroYo update would include the Vodafone 360 branding and software.
Thus, last night it was time to embark on the adventure of flashing my HTC Desire to a stock image direct from HTC. I reasoned that my goal should be to flash HTC's Android 2.1 (Eclair) image to the phone, and once there, the normal software update process should take me to 2.2.
And so it began...
I knew that I needed to create a gold card because the Vodafone image doesn't let you install non-Vodafone images. This I discovered as I tried to simply apply a stock 2.2 download and using boot recovery update.zip - all attempts met with a complaint of a "Fingerprint error".
I ended up at this page:
[TUT]Complete upgrading guide(root, unroot, flashing ROM & updates)
and followed Post #3 which details a) How to make a Gold Card* . Ignore the rest of #3
and then Post #4 - the "unrooting" guide.
You then need to find a download of the correct stock HTC Bravo WWE image ROM - I chose the second WWE ROM from this link (140MB download):
[ROM] Official HTC Desire RUU ROMS and OTA Update URLs
RUU_Bravo_HTC_WWE_1.21.405.2_Radio_32.36.00.28U_4.06.00.02_2_release_126984_signed.exe
Proceed through the rest of Post #4 "How to Flash ROM" with the Goldcard inside your Desire, and plugged into your PC.
The phone will take 5-10 minutes to complete upgrading (or downgrading) to HTC Stock 2.1 image. When it reboots you will have to go through all the original setup sequences you did when you first unboxed your phone.
You can then perform a Software Update Check and you should find you have a Android 2.2 FroYo update (90Mb) waiting for you. Proceed and let it do its thing.
Once done, welcome to FroYo.
All future updates will come direct from HTC - not from Vodafone, and you won't ever have the Vodafone 360 branding rubbish foisted upon you.
* My GoldCard creation had a bit of a hiccup, in that it turns out that the 4GB Samsung card which came with my Desire does not work as a Goldcard despite formatting and following the instructions to the letter. Trying an old 1GB Sandisk I had resulted in a good goldcard.
Aside from the goldcard hiccup - this all went surprisingly smoothly and painlessly.
Good luck.
Disclaimer: If you try any of the above - it is all your responsibility. I take no responsibility should you brick or damage your phone.
-
apr 201014
-
The O2 Joggler - A first hack.
Paul Gregg at 23:06 pm
![]()
If you were not aware - O2 last week reduced the price of the O2 Joggler from £149.99 to £99.99 to £49.99. Nothing remarkable in price reductions, however what is remarkable is what you actually get for your money.
The O2 Joggler is a silent 7" touchscreen device with Intel Atom Z520 running at 1.3Ghz, 512Mb ram, 1GB internal flash storage with additional storage available via an external USB port. What makes the device really exciting is that it also has a 1GB ethernet (Realtec 8168) and Wifi.
Looking at that - I know you're all thinking "linux box" - but conveniently, the default operating system on it is based on Ubuntu 8.04 and busybox, The frontend is a custom flash driven UI developed by OpenPeak (makers of the Jogger which is rebadged by O2).
There are plenty of clever individuals over at http://hackthejoggler.freeforums.org/and in the #mer channel on freenode who are working to allow the Joggler to run other Operating Systems such as Android, Ubuntu Netbook Edition, MID, even Windows and OSX.
However, the standard OS supplied is also pretty powerful and allows significant customisation. You can enable telnet just by turning it on with a custom USB stick plugged in. To do some of the things I'll be describing here you will need to have started with that.
Once you can telnet in, the world opens up and you can do lots of things that you would expect* to be able to do in a linux system. (* except run a web browser.... at this time - we don't have web access
with the stock OS due to the custom flash GUI interface.)
Lets install some useful utilities, how about perl, terminfo, irc clients, bit torrent, rsync, ssh/scp ? Yes, I know what you're thinking - overnight silent downloads - no need to leave PC on... nice...
I've built several of these utilities with installation instructions and uploaded them over here:
http://pgregg.com/projects/joggler/
Feel free to download, examine, install etc. Read the README on the download page - it explains how to do it. Most of the packs include an install.sh script that will provide an installation safety net - it won't overwrite existing files or libraries.
Usual disclaimers apply - you try these applications at your own risk. I accept no responsibility if you manage to brick, fry or otherwise trash your joggler.
Comments, suggestions for other applications are always welcome.
Update: Thanks to NP - seems I was a little too brutal with the library stripping to keep the download sizes small and I missed some required libraries (that I mistakenly thought were in the standard Joggler distro). I have rebuilt the following packages as they were missing some libs: rtorrent, rsync, sudo,ssh
The screen package has been rebuilt too to add one final tweak (to the installer script) so it can be used by non-root users - the only difference you need to do is run the command: chmod 666 /dev/ptmp /dev/tty
-
mar 201031
-
Is BT still collecting usage data?
Paul Gregg at 08:30 am
After the recent scandal over BT using Phorm (see here and here) is it still possible that BT is still covertly collecting data profiling its user's internet usage?
I have, as part of my home BT Total Broadband package, a HUAWEI Mobile Connect 3G Modem. This is a USB dongle that provides internet service. I rarely use it, but because of the storms last night my internet connection has been very unstable, therefore I plugged it in today.
When I started the "BT Connection Manager" software, it informed me that there was an update to the service and would I like to download it? Yes, ok, and a couple of minutes later it began to install itself. Then popped up the obligatory EULA which contained the paragraphs:
"Installation of this Software will automatically apply a unique identifier to the Software, this identifying feature will only be used in accordance with the BT privacy policy which can be found at www.bt.com.
This software automatically collects session and client parameter Information for all connections made via this Software. This information is automatically transmitted to BT at the start of each session where Internet access is available. This session information will only be used in accordance with the BT privacy policy which can be found at www.bt.com."
BTConnectionManagerEULA.txt
At this point I am unable to confirm if such a transmission is taking place as I declined the EULA, but would welcome feedback or comments from others that are able to investigate this more fully.
Update: Even though I clicked "Cancel" to reject the EULA - it did update the application and actually started it up before I exited the installer. Guess I have this privacy invading feature now.
-
sep 200929
-
Amazon 1 - 0 Waterstones, aka this morning's rant.
Paul Gregg at 11:02 am
SWMBO asked me to order a book for her this morning, so being the tightwad that I am, I go hunting for the ISBN and the cheapest place to buy it.
Amazon has it for £17.24 and Waterstone's for £18.49 (but if I order through quidco, then I receive another 8% cashback, making Waterstone's cheaper).
Waterstone's need me to create an account, fair enough and state "Also, please be aware that passwords are case sensitive, and must be a
minimum of seven characters long and at least one character must be
numeric." Again, all fairly standard.
So each time I try to enter a password which meets this criteria I'm hit with a javascript popup that claims: "Your new password must be at least 7 characters long and contain at least one digit."
"But it is!", I yell in frustration.
Using the Firefox "Web Developer" plugin I unhide the password boxes and see that my password doesn't have digits... wtf! I enter the digits again and find there is another hidden rule:
<input name="newPassword" type="password"Yes, an upper limit of 16 characters on the password.
id="fPassword" size="40" maxlength="16" value="" />
Right ok, make a password of 16 chars or under and move on...
Add name, postcode to the next form and it finds my address ok - click continue to (I presume) proceed to the CC entry form and voila!
Well not quite.
"There has been a problem processing this request
Please use the refresh button on your browser to try again.
Thank you."
A few refreshes later, it is apparent that Waterstone's has no intention of working, sod it, for 20p more I can have less hassle at Amazon.
-
jun 200903
-
Getty Images / BBC Math Fail.
Paul Gregg at 20:50 pm
From the BBC Magazine today is an article 7 questions on GCSE maths.
Can you spot the fail?



-
may 200928
-
Register your broadband not-spot now
Paul Gregg at 09:00 am
thinkbroadband, formerly ADSLGuide.org.uk, have setup a community site where UK sufferers of the lack of universal broadband can register their inability to obtain broadband (a not-spot) or where you are unable to obtain up to 2Mbps service (slow-spot).
The Northern Ireland map is here - if you currently suffer from a lack of, or poor broadband coverage (including satellite) please register your details on the site - by adding your postcode it will appear on the map and we can begin to get a true picture of the poor state of broadband in Northern Ireland.
Thanks.
-
may 200906
-
Borland, Farewell my sweet.
Paul Gregg at 15:31 pm
Today, May 6 2009, marks the day that Borland, that once great master of all software development has finally recognised there was no other recourse but to up and sell itself off in order to survive.
Back when I was a teenager, in the early 80s and personal computing was coming to the fore - I, and many others, aspired to work for that great company Borland. It was the pinnacle of language development and development tools and we wanted to work there. However, based in Ireland it was never to be.
Also, once upon a time I happened to be working for a very promising young company with a fantastic product line called Segue Software, based in Boston, MA. Segue also had its troubles but a new CEO saw its fortunes turn and it was climbing to success. This success was noticed by the aforementioned Borland as it tried to re-invent itself as an Application Lifecycle Management (ALM) company. The same day it was announced that Borland was acquiring Segue, it also announced it was selling its developer tools division (that's Delphi, JBuilder, and later Delphi for PHP, 3rd Rail line of products).
This was such a bitter-sweet time for many. I was overjoyed that I was going to work for Borland (childhood dream) - it didn't matter I wasn't going to work with the developer tools, working for "Borland" would just be cool. Sadness also because our little 200-man company was being consumed by a 1200-man behemoth (relatively) and no-matter which way you looked at it, people were going to lose their jobs. Pretty much the entire US East Coast staff (Segue Head Office) lost their jobs and the office was closed. Product development labs and Technical Support survived, simply by virtue that it was the product and product skills that were purchased, not the G&A functions - they could go.
I 'lived the dream' for the next 2.5 years in the IT department. Despite being remote, I loved working with the rest of the Borland teams as I was intimately involved in the merging/migration of Segue's systems into Borland's. I also had the pleasure of working with several departments to architect and deploy several new platforms (such as product downloads and licensing via Intraware, and the companies Salesforce.com, SFDC, deployment). I'll treasure the time I spent at Borland.
Of course there were several WTF moments. Most significantly, for me, was the company "hanging its hat" on BMS (Business Management Solutions) which ultimately proved to be a hatstand made of jello. Very few, outside of management and that product team, believed in it. Another significant WTF for Borland was, If you plan to be the Application LIFECYCLE Management company - why divest yourself (for a paltry $27m) of two of the world's major AppDev toolsets (Delphi and JBuilder). You've just removed the feeder market and upsell opportunity into your ALM business. Finally, and internal WTF to get off my chest, on what planet does the IT department belong as a subdivision of the HR department?
Borland will live on in the hearts of many of us who knew what she used to be. I think I left Borland a better place than I found it (as long as you don't look at the stock price ;), and I made some good friends. At the end of the day, there isn't much more you can ask from your tenure.
It is sad that today if you ask a typical Software Engineer if they know who Borland is, they'll respond "Who?" which typifies the company's slide into obscurity.
I wish the best of luck to my former colleagues, who I'm sure, will be wondering what is to happen next. I also hope that the new owners, Micro Focus International (who?), have good fortune with their ALM drive. Perhaps the Borland name might live on as a brand for a suite of ALM products - who knows what they'll do.
In the immortal words of Dr. Seuss "Don't cry because it's over. Smile because it happened."
-
apr 200927
-
PHP algorithms: Determining if an IP is within a specific range.
Paul Gregg at 23:48 pm
I spend a lot of time lurking in the #PHP channel (efnet and freenode, please - no flamewars) and this topic is a commonly asked one that usually gets a simplified answer in the form of using strpos(), or at best an ip2long() in a greater than and less than answer.
Unfortunately although people usually understand that an IP address is simply an unsigned 32 bit integer, and is easily determined, usually with $_SERVER['REMOTE_ADDR'], where the real challenge is - is in specifying the range within which they wish to check that IP address. IP ranges are usually specified in three common ways (in increasing complexity):
- Wildcard: 192.168.10.*
- Start-End range: 10.1.0.0-10.1.255.255
- CIDR*: 172.16.1.0/24
* Classless Inter-Domain Routing
The Wildcard method, or "classy", allows you to work at Class A (10.*.*.*), Class B (172.16.*.*) or Class C (192.168.10.*) levels of granularity which is how we used to do things in the old days (before the Web decided to make the Internet popular). But, increasingly, this just isn't granular enough for practical purposes.
Thus was born CIDR (yes, I'm skipping talking about Start-End ranges for now). CIDR brought about the concept that we really didn't need to break networks on 8, 16, 24 bit boundaries and we could be more granular by allowing the use of any number (from 2-30) to specify a range of networks. Details on why you can't use "31" is beyond the scope of this article.
CIDR renamed the former Class A, B and C networks as /8, /16 and /24 respectively and reflects the left-most significant bits of the 32-bit IP address. Thus was born the ability to specify very specific IP ranges in the form a.b.c.d/xx. However, part of the problem with this is that although it concisely describes the network start and end, most normal mortal humans couldn't decipher it. CIDR addressing can also be specified in the form of a longer netmask, e.g. a.b.c.d/255.255.255.224
Thus, the simplified form of Start IP - End IP was put in place for mere mortals and is typically used by those without a networking background. It also features heavily in consumer broadband routers and notably in Microsoft Windows DHCP server.
So having explained how a range, and by inference, that a netmask is, how can we use this knowledge to help us in determining if an IP is within a range?
What this article will attempt to do is guide you though the construction of algorithms to make the checking of IPs simpler.
Logically, Method 1 (the Wildcard), can be easily converted to Method 2 (Start-End range) by using setting Start and End to the Wildcard string and replacing the "*" character with 0 for the Start and 255 for the End, thus for example, "192.168.10.*" becomes "192.168.10.0-192.168.10.255" which should (I hope) be obvious to everyone.
We can then proceed to evaluate both Method1 and Method2 in the same way. In this we're simply going to use the PHP built in function ip2long() on all 3 values and perform a mathematical check for Start <= IP <= End.
list($lower, $upper) = explode('-', $range, 2);
$lower_dec = ip2long($lower);
$upper_dec = ip2long($upper);
$ip_dec = ip2long($ip);
return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );
We have, however, a complicating factor here - PHP does not do unsigned integers (32 bit) - which would be necessary for this math to work properly. We can negate this by switing to floating point data types. PHP stores floating types as 64 bit and so will have no problem with IPv4 address space (note - this obviously isn't granular enough for 128bit IPv6 addressing). Therefore the simplest way to solve the Start <= IP <= End problem with IPs and floating point numers is the following piece of code:
$lower_dec = (float)sprintf("%u",ip2long($lower));
$upper_dec = (float)sprintf("%u",ip2long($upper));
$ip_dec = (float)sprintf("%u",ip2long($ip));
return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );
Next we have the challenge of handing the CIDR netmasks. What we could do is to take a CIDR format IPaddress/netmask and calculate the Start and End IPs of that block and proceed as before - but that would be no fun - and would mean I haven't really taught anything through this article.
The method we're going to use here is how all the world's Internet routers determine if a destination IP is in a specific CIDR address space. And we're going to get down and dirty with bitmasks and logical bitwise operators.
So using a real world example, my webserver IP 80.76.201.37 and the netblock within which it resides is 80.76.201.32/27, how does this all work?
Well the /27 indicates that the first 27 bits of the IP address are the same network and IP address in that network (range) will have those same identical first 27 bits. Bits 28-32 are variable and allow 5 bits of variation. If you know your binary, then this means 32 possible IPs. (However with routing, you can't use the bottom and top IP from any range as these are special and mean the network and broadcast addresses respectively. [This is also why a /31 isn't much use (except for PPP links) as you can't use the 2 addresses that space gives you]).
So thinking logically, bitwise, if I take my IP address and the CIDR spec, then all I have to do is check that the first 27 bits all match and I'm good. Correct. So how would we do this in PHP? Sound's simple, lets just use PHP's bitwise logical AND operator: &
Again, correct.
In order to do this we need to convert 27 into what 27 really means - a 32 bit number of 27 ones and 5 zeros in binary (which is what 255.255.255.224 really looks like).
In pseudo-code you could then do if (IP & BITMASK) == (RANGE & BITMASK) then all is good and you know that the IP is within the range.
Visualising this using our real IP address (using the very handy unix tool ipcalc):
You can see this in the Wildcard line of 0.0.0.31, and the Network ORed with Wildcard results in the Broadcast address: 80.76.201.63.Address: 80.76.201.37 01010000.01001100.11001001.00100101 Netmask: 255.255.255.224 11111111.11111111.11111111.11100000 Wildcard: 0.0.0.31 00000000.00000000.00000000.00011111 Network: 80.76.201.32/27 01010000.01001100.11001001.00100000 HostMin: 80.76.201.33 01010000.01001100.11001001.00100001 HostMax: 80.76.201.62 01010000.01001100.11001001.00111110 Broadcast: 80.76.201.63 01010000.01001100.11001001.00111111 Hosts/Net: 30
Knowing this, then the IP address ANDed with the Network address will result in the same value as the Range ANDed with the Network address and so can be used as a comparison for an IP residing within that broadcast range.
How can we work out this Network address in PHP, again we have two strategies, one is to so a simple substr() and take the left most significant bits of the range and then simply pad out to the right with 0s. Or we can do some math with "NOT of 2 to the power of (32-range) - 1". Thus for our value /27 this gives us the decimal value 31, NOTed results in (65536-31) (representational in the bit form - PHP will see it as a negative integer, but we don't need to worry about that).
I'm sure by now, your screaming for some code (and if you stuck around this long, you really deserve it).
Code to manipulate a range/netmask into a broadcast address, using math, assuming:
We can convert the IPs to long integers using ip2long (denoted by variable_dec - dec being short for decimal):$ip = "80.76.201.37";$range = "80.76.201.32";$netmask = 27;
This gives us the basis of our math, we now just need to work out the broadcast address.$range_dec = ip2long($range);$ip_dec = ip2long($ip);
Strategy 1 using str_pad to create a string by padding with 1s and 0s.
We can achieve the same result though mathematics by NOTtin the wildcard value. This is our Strategy 2:$netmask_dec =bindec( str_pad('', $netmask, '1'). str_pad('', 32-$netmask, '0') );
Once we know the netmask address (in decimal) as we have here, we can know that, if by ANDing this with the original IP to check results against the Range ANDed with the Netmask, then the IP is within the range defined by the range/mask.$wildcard_dec = pow(2, (32-$netmask)) - 1;$netmask_dec = ~ $wildcard_dec;
This can be checked easily with:
return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));
I have pulled all of this logic together in a easily included file to provide a single function called ip_in_range($ip, $range) in which $ip is the IP address you want to validate and $range is a any of the above formats, Wildcard, Start-End addressing or CIDR. The function will return a simple TRUE or FALSE if the IP is in that range.
The source code to the all-in function is available here:
http://pgregg.com/projects/php/ip_in_range/ip_in_range.phpsWith an example run (and source code):
http://pgregg.com/projects/php/ip_in_range/test.php
I hope this article has been educational, please feel free to leave comments or feedback.
Update: There have been questions about PHP's signed integers and my use of bit operations in the code. It is important to recognise that when dealing with signed or unsigned 32 bit integers purely as bit patterns for masking with a netmask or broadcast address pattern - the fact that a number (128.0.0.0 or above) really is negative, doesn't have any impact on the validity of the result. The only impact to not having signed 32 bit integers is in the Start-End range check (example 2 above: 10.1.0.0-10.1.255.255) where a range spanning the switch from positive to negative would be catastrophic to the check. We can safely work around that problem by using floating point numbers as we are only doing <= and >= comparisons and not attempting any bitwise operators (which don't work on floats).
