Xboxic Forum
Xboxic News - Xboxic Wiki

Go Back   Xboxic Forum > Xbox Live > Xbox Live Service

Xbox Live Service The place to be for any questions about the service, your subscription or the Marketplace.

Reply
 
Thread Tools
Old June 28th, 2006, 23:05   #1
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default My Microsoft Points Converter

Hi guys,

I have been playing with learning PHP and thought i would make a little converter that changes MSP (Microsoft Points) into these currencies.

USD, EURO, GBP, CAD, AUD, JPY, NOK & CHF

Check it out: http://www.mspconverter.com/

Thanks

bigsteveouk

EDIT: Added JPY, NOK & CHF
EDIT2: Changed to new URL

Last edited by bigsteveouk; September 1st, 2006 at 17:08.
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 28th, 2006, 23:36   #2
Studley
Hardcore Member
 
Studley's Avatar
 
Xbox Live: StudleyUK
Join Date: Mar 2006
Location: Peterborough, UK
Posts: 734
Default Re: My Microsoft Points Converter

Well I'm a web developer and a tester for a living so I can give you a few little tips :thup: Nothing important, it certainly works.

#1: It's not displaying the correct number of decimal places for currencies; i.e. if the price is £12.40 then it displays £12.4. There are two ways you can deal with this; either convert the original number to two decimal places before displaying it, or do a check to see if it's only got one character after the "." symbol, and if so then pad a 0 on the end. As you're still learning PHP, I'll do the "cruel to be kind" thing and leave you to find out how to do it yourself - you'll learn more by trial and error First way is definitely easiest.

#2: Yeah, I got sneaky and looked in your code. Can't you get Yen to work? Why did you comment it out? If you don't want it to even appear in your code, use PHP comment tags rather than HTML comment tags, and it won't even be outputted to the code. PHP comment tags are definitely safer because then sneaky people like me can't see stuff that they shouldn't!

#3: You've got just the one form input field (MSP) but you're not validating it; you should really make it so that it only accepts numbers, and if you put anything else in then it displays a popup error message "Please enter a numeric value for MSP" or something. On the plus side it doesn't crash if you put a non-numeric value in... was that just luck?

Sorry for being VERY picky, it's my job! But as first PHP projects go, it's a great start. Heck it works, I couldn't break it as such, which is better than most of the projects that I put together myself... Good luck in your future work
Studley is offline  
Picture for StudleyUK StudleyUK Peggle Modern Warfare® 2 Halo Waypoint Halo 3: ODST Duke Nukem 3D
Gamerscore 43430
Reply With Quote
Old June 28th, 2006, 23:51   #3
Cage
Newsposter
 
Cage's Avatar
 
Xbox Live: Cage NL
Join Date: May 2006
Location: The Netherlands
Posts: 1,145
Thumbs down Re: My Microsoft Points Converter

Only one comment. Why isn't xboxic.com on the "Links to cool websites" page?
Other then that (and the decimal and jpy problem), great work for a first project
__________________
Disclaimer: This is mho so don't be offended. It's nothing personal.
Cage is offline  
Picture for Cage NL Cage NL Batman: Arkham Asylum Monkey Island: SE FIFA 08 EA SPORTS FN 3 Dash of Destruction
Gamerscore 9416
Reply With Quote
Old June 29th, 2006, 00:06   #4
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Cheers for the advice guys. Im working on the Yen as we speak!
I will have a look at adding the extra 0 to the end when needed.

Also, I have added xboxic to the links page
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 29th, 2006, 00:16   #5
Rival24
Editor Playstation
 
Rival24's Avatar
 
Xbox Live: Rivalz0r
PSN ID: Rivalz0r
Wii: 1605-9218-7353-0870
Join Date: Feb 2006
Location: Netherlands
Posts: 4,910
Default Re: My Microsoft Points Converter

Oh and before Curry begins whining about it: W3C thingy
Rival24 is online now  
Picture for Rivalz0r Rivalz0r Modern Warfare® 2 Call of Duty 4 GTA IV Left 4 Dead Brütal Legend
Gamerscore 57482
Reply With Quote
Old June 29th, 2006, 00:18   #6
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by Rival24
Oh and before Curry begins whining about it: W3C thingy
Hehe... not too worried about that It's more to learn this damn php
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 29th, 2006, 00:35   #7
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

fixed the lack of the extra zero with the money_format converter
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 29th, 2006, 00:39   #8
TRIGGER M4N
Elite Member
 
Join Date: Mar 2006
Posts: 2,017
Default Re: My Microsoft Points Converter

Ok, I'm not a maths-magician, but if I type 1 MS point, it says that = 1 pence, I type 34 in and it converts to 28 pence, can you explain that? Shouldn't it be 34 pence?

Other than that, that site is actually really neat, and I've learned from it immediatly.
TRIGGER M4N is offline  
Reply With Quote
Old June 29th, 2006, 00:46   #9
Rival24
Editor Playstation
 
Rival24's Avatar
 
Xbox Live: Rivalz0r
PSN ID: Rivalz0r
Wii: 1605-9218-7353-0870
Join Date: Feb 2006
Location: Netherlands
Posts: 4,910
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by TRIGGER M4N
Ok, I'm not a maths-magician, but if I type 1 MS point, it says that = 1 pence, I type 34 in and it converts to 28 pence, can you explain that? Shouldn't it be 34 pence?

Other than that, that site is actually really neat, and I've learned from it immediatly.
My guess is that it's rounded off.
Rival24 is online now  
Picture for Rivalz0r Rivalz0r Modern Warfare® 2 Call of Duty 4 GTA IV Left 4 Dead Brütal Legend
Gamerscore 57482
Reply With Quote
Old June 29th, 2006, 00:48   #10
TRIGGER M4N
Elite Member
 
Join Date: Mar 2006
Posts: 2,017
Default Re: My Microsoft Points Converter

Yeah, I can be a bit weird like this, but he asked for feedback, and that's the only flaw I could find.
TRIGGER M4N is offline  
Reply With Quote
Old June 29th, 2006, 00:59   #11
aries
Junior Member
 
aries's Avatar
 
Xbox Live: James Quincy
Join Date: Jun 2006
Location: Canada
Posts: 20
Send a message via MSN to aries Send a message via Yahoo to aries
Default Re: My Microsoft Points Converter

honestly, i think u did a good job. but on the canadian funds, u are about 60 cents off. its actually 19.99 for a card that gives u 1250 points. i know its nitpicking, but i just thought id be honest. but good job with that. i could never do it lol.
__________________
Currently playing BFME2, halo 2, cod2, kingdom hearts 2, graw, mgs 3, and shadow of collosus.

member sony's GAP 6/20/06
aries is offline  
Reply With Quote
Old June 29th, 2006, 01:02   #12
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by aries
honestly, i think u did a good job. but on the canadian funds, u are about 60 cents off. its actually 19.99 for a card that gives u 1250 points. i know its nitpicking, but i just thought id be honest. but good job with that. i could never do it lol.
I was working off a conversion of 1MSP = 1.55CAD. So it should be 1.59 or 1.60 per msp? Please let me know
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 29th, 2006, 01:05   #13
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by TRIGGER M4N
Ok, I'm not a maths-magician, but if I type 1 MS point, it says that = 1 pence, I type 34 in and it converts to 28 pence, can you explain that? Shouldn't it be 34 pence?

Other than that, that site is actually really neat, and I've learned from it immediatly.
Ok, i think i have fixed that now. Can you tell me if it's ok?
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 29th, 2006, 03:14   #14
Curry
Root
 
Curry's Avatar
 
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by bigsteveouk
Hi guys,

I have been playing with learning PHP and thought i would make a little converter that changes MSP (Microsoft Points) into these currencies.

USD, EURO, GBP, CAD & AUD

Check it out on my domain. http://www.stevehunter.co.uk/

As I say, i am still learning, but any feedback or suggestions would be appreciated.

Thanks

bigsteveouk
Looks and functions good As Rival24 predicted, I will be bitching about validation (had that link on my clipboard before I read his post ) "I'm just learning this stuff" isn't an excuse, writing valid HTML is a prerequisite for learning PHP. After all, all PHP does it outputting HTML, so you'd better get the HTML completely covered before you start doing something that generates HTML. Sounds harshes than I mean it Validation errors are no worldshocking disaster, but you should always try to run the validator regularly during development. And about "I'm just learning": are you allowed to drive off the roadway during driving lessons because you are just learning? No, you're bound to basic traffic rules. Similarly, web development is bound by basic traffic rules, in this case those laid out by the World Wide Web Consortium or W3C. Follow their rules, you'll learn to appreciate it

And please ask anything you want to know, I know a lot of PHP and HTML and I'm more than willing to help with whatever you want to know. Especially now you've added that link
Curry is offline  
Picture for curry684 curry684 Modern Warfare® 2 Forza Motorsport 3 GTA IV Lost Odyssey Kameo
Gamerscore 18873
Reply With Quote
Old June 29th, 2006, 11:10   #15
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Cheers Curry, I will add a load of CSS and clean it up tonight. It's not looking the same in IE as it does in FF so need to work on that.

EDIT: All HTML Valid now

Last edited by bigsteveouk; June 29th, 2006 at 12:12.
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old June 29th, 2006, 13:21   #16
Studley
Hardcore Member
 
Studley's Avatar
 
Xbox Live: StudleyUK
Join Date: Mar 2006
Location: Peterborough, UK
Posts: 734
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by bigsteveouk
EDIT: All HTML Valid now
You're one step ahead of Xboxic then

Seems that speech marks and apostrophes cause some major confusion...
Studley is offline  
Picture for StudleyUK StudleyUK Peggle Modern Warfare® 2 Halo Waypoint Halo 3: ODST Duke Nukem 3D
Gamerscore 43430
Reply With Quote
Old June 29th, 2006, 14:13   #17
Curry
Root
 
Curry's Avatar
 
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by Studley
You're one step ahead of Xboxic then

Seems that speech marks and apostrophes cause some major confusion...
Hmm nice bug, missing a call to htmlentities there in constructing the trackers Will fix tonight if I find time
Curry is offline  
Picture for curry684 curry684 Modern Warfare® 2 Forza Motorsport 3 GTA IV Lost Odyssey Kameo
Gamerscore 18873
Reply With Quote
Old June 29th, 2006, 14:16   #18
YLA G
Experienced Member
 
YLA G's Avatar
 
Xbox Live: YLA G
Join Date: Jun 2006
Location: Belgium
Posts: 201
Default Re: My Microsoft Points Converter

don't forget the corrupt div :p
__________________
MS Official XDCP (com. devloper) and XET (Elite) for xbox
YLA G is offline  
Picture for YLA G YLA G Modern Warfare® 2 Battlefield 1943™ Halo Waypoint Halo 3 South Park
Gamerscore 26378
Reply With Quote
Old June 29th, 2006, 21:38   #19
swoosh bnd
Newbie Member
 
Xbox Live: swoosh bnd
Join Date: Jun 2006
Posts: 9
Default Re: My Microsoft Points Converter

I found that if you put more than 316 9's in it, its calculations become really messed up . Other than that it's a really cool tool.

Last edited by swoosh bnd; June 29th, 2006 at 21:51.
swoosh bnd is offline  
Picture for swoosh bnd swoosh bnd Modern Warfare® 2 PGR 4 Forza Motorsport 2 Zuma Halo 3
Gamerscore 24722
Reply With Quote
Old June 30th, 2006, 02:22   #20
Curry
Root
 
Curry's Avatar
 
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by swoosh bnd
I found that if you put more than 316 9's in it, its calculations become really messed up . Other than that it's a really cool tool.
You should apply for a job as Quality Assurance manager somewhere
Curry is offline  
Picture for curry684 curry684 Modern Warfare® 2 Forza Motorsport 3 GTA IV Lost Odyssey Kameo
Gamerscore 18873
Reply With Quote
Old June 30th, 2006, 09:03   #21
swoosh bnd
Newbie Member
 
Xbox Live: swoosh bnd
Join Date: Jun 2006
Posts: 9
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by Curry
You should apply for a job as Quality Assurance manager somewhere
I think I made a mistake, it was more than 308 when the error occurred. The USD will always be at $115246033600500432.00 however many you add beyond that.
swoosh bnd is offline  
Picture for swoosh bnd swoosh bnd Modern Warfare® 2 PGR 4 Forza Motorsport 2 Zuma Halo 3
Gamerscore 24722
Reply With Quote
Old June 30th, 2006, 09:58   #22
Curry
Root
 
Curry's Avatar
 
Xbox Live: curry684
Wii: 2894-5505-7501-3553
Join Date: Feb 2006
Location: The Netherlands
Posts: 5,601
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by swoosh bnd
I think I made a mistake, it was more than 308 when the error occurred. The USD will always be at $115246033600500432.00 however many you add beyond that.
Hmm that's a surprising amount actually, I was expecting 2 to the power of 31 or 63 Hint for bigsteve: always validate your inputs, never expect the user to follow your intended logic. Just fail for numbers of more than 10 digits or something That way you can also avoid situations like this:
Quote:
[CENTER]53abc Microsoft Points is:[/CENTER]
USD 66.22 Cents
GBP 45.05 Pence
EURO 61.64 Cents
CAD 84.75 Cents
AUD 87.45 Cents
JPY ¥78.44
preg_match("[0-9]{1,10}") would solve most problems
Curry is offline  
Picture for curry684 curry684 Modern Warfare® 2 Forza Motorsport 3 GTA IV Lost Odyssey Kameo
Gamerscore 18873
Reply With Quote
Old July 4th, 2006, 21:20   #23
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Just wanted to say thanks to everyone for the tips etc. I will continue to develop the points converter. Hello to the people who send messages to my xbox too.
__________________
Check it out one time! Xboxscoop.com
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Old July 5th, 2006, 12:43   #24
| V |
Experienced Member
 
| V |'s Avatar
 
Xbox Live: Lezus
Join Date: Jun 2006
Posts: 222
Default Re: My Microsoft Points Converter

Not to be a negative nancy but you actually come round to buying MS points dont you have to buy them in clumpos of like 400,800 etc?

And the program is very nice btw
| V | is offline  
Picture for Lezus Lezus Modern Warfare® 2 Shadow Complex SuperStreetFighter2THD Splosion Man Forza Motorsport 3
Gamerscore 29202
Reply With Quote
Old July 5th, 2006, 13:27   #25
bigsteveouk
Apprentice Member
 
bigsteveouk's Avatar
 
Xbox Live: bigsteveouk
Join Date: Apr 2006
Location: Wirral, UK
Posts: 130
Default Re: My Microsoft Points Converter

Quote:
Originally Posted by | V |
Not to be a negative nancy but you actually come round to buying MS points dont you have to buy them in clumpos of like 400,800 etc?

And the program is very nice btw
This is true. But the reason I have made it flexible is that the content on marketplace is different prices. Example: A picture pack might be 80MSP. Or say you have 220 points left and your wondering how much is that worth?
__________________
Check it out one time! Xboxscoop.com
bigsteveouk is offline  
Picture for bigsteveouk bigsteveouk Modern Warfare® 2 Halo Waypoint Halo 3: ODST The Force Unleashed Halo 3
Gamerscore 28344
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 12:26.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.