adman4054 Posted June 18, 2014 Share Posted June 18, 2014 I'm trying to figure out how to add "\fs13" to the base64 encoding. For example, the "ad->text" field would look like this <ad-content type="rtf">ZGZnIGRmZyBkZmcgZGZnIGRmZyBkZmcgZGZnIGRmZyBkZmcgZGZnIGRmZyBkZmcgZGZnIGQ=</ad-content> The code to generate the above is -- <ad-content type=\"rtf\">".htmlentities(base64_encode($ad->text))."</ad-content>"; I need the encoding to include the "\fs13" in front of the encoded ad-content. The "\fs13" is simply a font size that will tell the system what font size to use. <ad-content type="rtf">ZGZnIGRmZyBkZmcgZGZnIGRmZyBkZmcgZGZnIGRmZyBkZmcgZGZnIGRmZyBkZmcgZGZnIGQ=</ad-content> I'm also trying to encode an additional field within the "ad-content type". The present code looks like this: <ad-content type=\"rtf\">".htmlentities(base64_encode($ad->text))."</ad-content>"; I need to add "($ad->photo_file_name)" to the above, so that the "ad->text" and the "ad->photo_file_name" are within the ad-content type that is being decoded.Hope that makes sense, appreciate ant help, Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/289194-add-elements-to-base-64-encoding/ Share on other sites More sharing options...
Solution Ch0cu3r Posted June 18, 2014 Solution Share Posted June 18, 2014 If I understand correctly, all you need to is concatenate the two values <ad-content type=\"rtf\">".htmlentities(base64_encode('\fs13'.$ad->photo_file_name.$ad->text))."</ad-content>"; Quote Link to comment https://forums.phpfreaks.com/topic/289194-add-elements-to-base-64-encoding/#findComment-1482837 Share on other sites More sharing options...
adman4054 Posted June 18, 2014 Author Share Posted June 18, 2014 If I understand correctly, all you need to is concatenate the two values <ad-content type=\"rtf\">".htmlentities(base64_encode('\fs13'.$ad->photo_file_name.$ad->text))."</ad-content>"; That's what I needed, thank you Ch0cu3r ! Quote Link to comment https://forums.phpfreaks.com/topic/289194-add-elements-to-base-64-encoding/#findComment-1482853 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.