newchannel
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2012
07:58 PM
PHP question
My banners ads are php on a 2nd server. Like the other images on the channel, I have HD and SD banner images. My question is how do I add both HD and SD banner images to the php?
An example of one line in php is:
$bannerCode[$bannerCounter] = 'http://www.xxxxxxx/xxxx/images/xxxxxxx540x60.png,http://xxxx.com/vid/xxxxx.m4v';
Also, I just noticied tonight that when I click a static banner ad it exits the channel. (Not the same line of code as I have above..static of course is minus the video url.) It used to be okay and just do nothing. Any one else have this happen?
Thank you.
An example of one line in php is:
$bannerCode[$bannerCounter] = 'http://www.xxxxxxx/xxxx/images/xxxxxxx540x60.png,http://xxxx.com/vid/xxxxx.m4v';
Also, I just noticied tonight that when I click a static banner ad it exits the channel. (Not the same line of code as I have above..static of course is minus the video url.) It used to be okay and just do nothing. Any one else have this happen?
Thank you.
http://www.victoryNOWfilmsandtv.com
3 REPLIES 3

RokuRobB
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2012
09:04 PM
Re: PHP question
Your PHP script would need to know which version of the banner to serve up. Add a parameter to the PHP script for the display type. Then int the channel BrightScript code, you can determine the display type by creating an roDeviceInfo component, calling the GetDeviceType() function, and using the result of that call to decide what value (HD or SD) to send to your PHP script in that new parameter.
newchannel
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2012
08:26 AM
Re: PHP question
Sorry for the delay in answering.
Thank you for the information on this.
Thank you for the information on this.
http://www.victoryNOWfilmsandtv.com

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2012
11:40 AM
Re: PHP question
The Brightscript SDK is setup so that you always supply both and HD and SD asset wherever an image is specified. The firmware then requests to download the appropriate asset based on the current display setting on the Roku box.
The PHP code should make both HD and SD urls available for a banner ad in your feeds.
The Brightscript code on the Roku will set the banner ad on a springboard or poster screen with the method SetAdURL(sdAdUrl, hdAdUrl)
--Kevin
The PHP code should make both HD and SD urls available for a banner ad in your feeds.
The Brightscript code on the Roku will set the banner ad on a springboard or poster screen with the method SetAdURL(sdAdUrl, hdAdUrl)
--Kevin