Jump to content

Popweb

Members
  • Posts

    10
  • Joined

  • Last visited

Popweb's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. AHA! A little experimenting later: Turns out that I can unserialize, if I mb_convert_encoding() the string to utf-8 first. Mystery solved. Thx John
  2. And Jaques... well...that was sort of rude?! ... Obviously I didn't intend to not show the entire string?! I removed the first part to test. And forgot to paste it back in, when asking for help. Dont tell me you never make mistakes? Yes I replaced the data with "Some data". But not to hide anything. That was to make the string more readable. Another mistake. I am sorry about that. Here is one of the actual strings: (Except: I changed the users email adress. but I counted the new number of chars and changed the value.) a:12:{s:4:"navn";s:18:"Margit Anna Brodam";s:5:"alder";s:33:"13 år når sommerskolen afholdes";s:5:"email";s:19:"adresse@adresse.com";s:5:"kirke";s:45:"Asminderød Kirke / personligt meldlem af FUK";s:17:"praktisk-baggrund";a:1:{i:0;s:71:"Jeg kender alle nodeværdier og tonenavne og kan klappe noterede rytmer";}s:17:"instrument-toggle";a:1:{i:0;s:2:"Ja";}s:10:"instrument";s:22:"Violin begynder niveau";s:10:"min-stemme";s:35:"Dyb 2. sopran med smuk stor klang ";s:9:"kommentar";s:106:"Cille Buch er Margits korlærer. Margit har sunget i kirkekor i 5½ år og tillige i koncertkoret i 2 år.";s:19:"vaerelses-fordeling";s:0:"";s:18:"vegetar-eller-lign";s:0:"";s:15:"FUK-laereplaner";a:1:{i:0;s:0:"";}} I counted the size of the different vars and checked the s-numbers. Turns out that every time a danish letter (æ, ø and å) appears in the string, the number differs from the actual number of chars. I suppose that might be it? The number is too big, when there are danish chars in the vars. Any suggestions? Thank you all for taking the time to read, and try to help out. Even if you are being rude. ;-) I need the help, and I dont have to pay for it - so ofcourse I have to deal with whatever response I get. :-) Thx John
  3. Ah! Your're right! I tried removing the first part - to try to make it look more json-like. This is the full string: a:12:{s:4:"navn";s:18:"Some data";s:5:"alder";s:33:"Some data";s:5:"email";s:17:"Some data";s:5:"kirke";s:45:"Some data";s:17:"praktisk-baggrund";a:1:{i:0;s:71:"Some data";}s:17:"instrument-toggle";a:1:{i:0;s:2:"Ja";}s:10:"instrument";s:22:"Some data";s:10:"min-stemme";s:35:"Some data";s:9:"kommentar";s:106:"Some data";s:19:"vaerelses-fordeling";s:0:"";s:18:"vegetar-eller-lign";s:0:"";s:15:"FUK-laereplaner";a:1:{i:0;s:0:"";}} Aha... so it may be serialized? I tried to unserialize(the string); And got: Error at offset 49 of 600 Any ideas?
  4. So are you saying that the string IS json-encoded? I didnt recognize it as being json.... And if I run json(the string); And then try to print_r the result I get nothing.... ??
  5. Hi there. Does anyone here have an idea to how I can extract this to an array: {s:4:"navn";s:18:"Some data";s:5:"alder";s:33:"Some data";s:5:"email";s:17:"Some data";s:5:"kirke";s:45:"Some data";s:17:"praktisk-baggrund";a:1:{i:0;s:71:"Some data";}s:17:"instrument-toggle";a:1:{i:0;s:2:"Ja";}s:10:"instrument";s:22:"Some data";s:10:"min-stemme";s:35:"Some data";s:9:"kommentar";s:106:"Some data";s:19:"vaerelses-fordeling";s:0:"";s:18:"vegetar-eller-lign";s:0:"";s:15:"FUK-laereplaner";a:1:{i:0;s:0:"";}} It is a string picked up in a Wordpress database. Wordpress plugin. I dont need all the s:# I just need "navn": "Some data", "alder": "Some data", "email": "Some data". ("Some data" obviously varying). $theArray['navn']="Some data"; $theArray['alder']="Some data"; and so forth Can you help? Thanks John
  6. Thanks for taking the time, Kicken. :-) I am actually already using the zip extension, on a different project. With no negative feedback, sofar. However, those zips are probably not being used. ;-D I dont think there is a timeout problem, since the zip is not very big. And at least one of the users is on a very fast connection. But I am going to make sure, by asking her to send me the downloaded file. Just in case. Thanks! But actually your input makes me think. I am going to ask one of the people with zip-problems, to try to open one of the zip-files created with the zip-extension. I no problems, I will simply generate the html-zip, using the zip extension. I dont know if you have any use of where this ends for me - but just in case anybody should be in the same position, I will let you know how it ends. Thanks again.
  7. Hi there! I was wondering if anyone here has experience in putting zip files on your websites, for others to download and use? I am setting up a website that is offering a bunch of pdf dokuments and mp3-files, set up as a local web-page in html. Meaning: "open zip file and click on index.html" - thus getting access to the downloaded local "website". But I am having trouble zipping the html-folder. Or rather: some of the PC/Windows users are having trouble unzipping the file. The file unzips and works well on my Mac, - and on my 2 test PC's (Vista and XP). But some users report errors when unzipping. ("Unexpected error." And "There is a problem with the encryption of the folder") .... I should mention that the users are mostly VERY unexperienced computer-people. So it needs to be as simple as possible and with as few choices and options as possible. The users are mostly blond sopranos, and the folder contains singing instructions and instructional mp3's. (Im kidding about the blond part) Does anyone have ideas to how I should compress the folder? Thanks John
  8. Dear Premiso! I am going to check out your link. And I thank you very much for your time and appreciate that you are doing this to help, and not geting paid. Thank you for that. However, - your "Let me google this for you"-addition is straight out arrogant. In the sourcecode for it, was added: "For all those people who find it more convenient to bother you with their question rather than google it for themselves." .... Excuse me?!! I do NOT find it "more convenient to bother you with my question rather than google it, myself". I feel like I spend half my time googling, - and thats perfectly ok. I need to, in order to find what I need. The fact that I ask a question here, is based on me being insecure - and was hoping that somebody out there had experience with something, and would like to share their experience and knowledge. I googled. But the link that you came up with, I actually hadn't found. I know - I am probably not a very good googler. So be it, we all do things as best as we can. I thank you again, for your help. It actually IS very much appreciated. But please dont assume that other people are lazy and idiots. (well... google-idiots perhaps, but in general - please dont). It is an awkward situation, because you ARE helping me. So according to social codecs it feels like I am not allowed speak up, when you say: "Here is your answer. - You lazy idiot". Please consider this. That said, the "Let me google this for you" is actually funny. :-) You just hit a nerve with me. I really do try to do my own work. Peace, John
  9. The GD library is installed. But not Imagemagick. - And as far as I understand Imagemagick is needed, to use Imagick. Third party service? Any particular in mind? I was sort of hoping that somebody had experience with a library or opensource code of some sort. :-) No?
  10. Hi all! I have been browsing throug a bunch of discussions regarding image conversion. But not found the answer, yet. So here goes. I have a script that uploads images - resizing and resampling them. But sctrictly jpgs. Now I would like to make it possible to upload other image-types. bmp gif png pdf eps - would be nice! Or as many of these as possible. I do realize that converting to jpg will in some cases mean lower quality images. For my purpose that is ok. The only reason I want to convert to jpg is that I already have a function to reseize jpgs. (I resize to either a max height or a max width, depending on landscape or portrait). But if it is easier to just resize the other image-formats, instead of converting to jpg - then that is perfectly ok too. Any suggestions? Thank you John
×
×
  • 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.