Jump to content

Need help coding a script..


parker-94

Recommended Posts

Hello, I would like to start by pointing out my PHP skills are limited, so I ask that any help you offer is noob-friendly ;)

 

On my forum, a PS3 forum, I would like to display their trophy cards automatically from PS3Trophycard.com

 

Here's the URL's used by PS3Trophycard.com for reference:

 

http://card.mmos.com/psn/profile/pa/r/parker-94/card.png

 

I'm using phpBB to run my forum software, and have a custom field for determining their PSN ID, so usually replacing the "parker-94" part in the above URL with {postrow.POSTER_FROM}, which would automatically create the URLs.

 

However, my issue is with the pa/r part of the URL. I need a code or script which reads the user's PSN ID, and takes the first two letters into one part, and then reads the third letter for the next bit, like so:

 

http://card.mmos.com/psn/profile/[FIRST TWO LETTERS]/[THIRD LETTER]/[FULL PSN ID]/card.png

 

I was wondering how I would go about doing so? Basically, I need PHP to read the first 2 letters of something, and then the third letter.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/212178-need-help-coding-a-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.