Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.