Buying PHP/Wordpress help needed with serialize function

Discussion in 'Programming' started by lhornaday, Jun 14, 2011.

  1. #1
    I am adding content through a custom script into Wordpress posts. I have problems inserting images because of the serialized meta data that Wordpress uses. It looks like this:

    a:6:{s:5:"width";s:3:"155";s:6:"height";s:3:"225";s:14:"hwstring_small";s:22:"height='96' width='66'";s:4:"file";s:35:"2011/06/101WordpressTipsPackage.jpg";s:5:"sizes";a:4:{s:9:"thumbnail";a:3:{s:4:"file";s:35:"101WordpressTipsPackage-150x150.jpg";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:9:"shop_tiny";a:3:{s:4:"file";s:33:"101WordpressTipsPackage-36x36.jpg";s:5:"width";s:2:"36";s:6:"height";s:2:"36";}s:14:"shop_thumbnail";a:3:{s:4:"file";s:33:"101WordpressTipsPackage-90x90.jpg";s:5:"width";s:2:"90";s:6:"height";s:2:"90";}s:10:"shop_small";a:3:{s:4:"file";s:35:"101WordpressTipsPackage-150x150.jpg";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}
    Code (markup):
    I am stuck. I can handle all of the image creation and sizing, but not this part.

    I will pay for someone to show me how to build an array that can be serialized and saved. I can discuss it further through PMs.

    Thanks
     
    lhornaday, Jun 14, 2011 IP
  2. ankit_frenz

    ankit_frenz Active Member

    Messages:
    1,111
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    63
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    You have checked php serialize functions right? if you still need help..pm me exactly what you want done..and I will follow through with the code.
    Thanks
     
    ankit_frenz, Jun 15, 2011 IP
  3. Borghunter

    Borghunter Well-Known Member

    Messages:
    212
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Borghunter, Jun 15, 2011 IP
  4. lhornaday

    lhornaday Active Member

    Messages:
    269
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    As Seller:
    100% - 5
    As Buyer:
    100% - 4
    #4
    I have looked into the serialize functions.

    I'm having problems building the array that should be serialized.

    If anyone can unserialize my example and make sense of what it contains, that is what I need.
     
    lhornaday, Jun 15, 2011 IP
  5. lhornaday

    lhornaday Active Member

    Messages:
    269
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    As Seller:
    100% - 5
    As Buyer:
    100% - 4
    #5
    I still need help with this. What is comes down to is plugging the data from getimagesize() from two or three images into an array.

    Please help out if you can. Thanks!
     
    lhornaday, Jun 15, 2011 IP
  6. misbah

    misbah Active Member

    Messages:
    265
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    68
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Job done, please check your PM. Thank you :)
     
    Last edited: Jun 16, 2011
    misbah, Jun 16, 2011 IP
  7. lhornaday

    lhornaday Active Member

    Messages:
    269
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    As Seller:
    100% - 5
    As Buyer:
    100% - 4
    #7
    This project is done. Thanks misbah!
     
    lhornaday, Jun 16, 2011 IP