We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Need to parse site_pages field value from exp_sites table

Development and Programming

simirag's avatar
simirag
1 posts
14 years ago
simirag's avatar simirag

Hi,

I’m pulling out site_pages from the exp_sites table dynamically depending on what name the specific site has. I’m getting a very weird string that I’d like to Parse in some way so I can use the data stored within, how do I do that?

Here’s the part of the string that i got

YToxOntpOjE7YTozOntzOjQ6InVyaXMiO2E6MzA6e2k6MTE7czoxMzoiL2Jhc2UucGhwP3E9MSI7aToxMjtzOjExOiIvc2htZW51LnBocCI7aToxMztzOjE0OiIvdGVzdC90ZXN0LnBocCI7aToxNDtzOjM1OiIvd2h5X3NpbmdsZWhvcC9y

thanks ~simirag

       
simirag's avatar
simirag
1 posts
14 years ago
simirag's avatar simirag

Anyway i got the solution,the site_page value was base64 encoded string.We can decode this string using php base64_decode() decode function ,it returns a serialized data,then we can use unserialize() function to get actual data.

$data = unserialize(base64_decode ($encoded_string )); echo”<pre>”;print_r($data[1]);echo”<pre>”;

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.