Search found 41 matches

by abeall
Thu Feb 08, 2007 8:24 pm
Forum: PHP - Code
Topic: Unbalanced includes
Replies: 9
Views: 1234

Yeah, includes don't work how I expected them to, either. Can we see the actual code?
by abeall
Thu Feb 08, 2007 7:18 pm
Forum: PHP - Code
Topic: [Solved]XML document saved with bad formatting
Replies: 17
Views: 4510

My code is attached. The POST data is submitted by Flash, which is posting data input by the user: <?php if(count($_POST) == 4 && strlen($_POST['name']) <= 50 && strlen($_POST['favkind']) <= 50 && strlen($_POST['fav']) <= 50 && strlen($_POST['comment']) <= 100){ forea...
by abeall
Thu Feb 08, 2007 9:14 am
Forum: PHP - Code
Topic: [Solved]XML document saved with bad formatting
Replies: 17
Views: 4510

Perfect. Thanks.

Any idea about the &#xD; characters replacing linebreaks?
by abeall
Thu Feb 08, 2007 8:28 am
Forum: PHP - Code
Topic: [Solved]XML document saved with bad formatting
Replies: 17
Views: 4510

There is, but that states it is on by default anyway, and that appears to only have to do with loading XML. It will preserve the whitespace on the loaded XML, the problem is that all the nodes that I append and save are not formatted, but rather tacked on to the end. So, let's say I have this: <root...
by abeall
Wed Feb 07, 2007 11:52 pm
Forum: PHP - Code
Topic: [Solved]XML document saved with bad formatting
Replies: 17
Views: 4510

[Solved]XML document saved with bad formatting

I'm using DomDocument to open an XML document and append some nodes and attributes, and save it. There are two problems: 1) The XML file has no whitespace between nodes. They are all smashed together in one line. Below is an example of human readable, and what PHP makes: <root> <node>Some text</node...
by abeall
Mon Feb 05, 2007 11:25 am
Forum: PHP - Code
Topic: [SOLVED]How to get SESSION vars from PHPSESSID w/o a cookie?
Replies: 7
Views: 4505

Hmmmm...ok... I believe that relying on PHPSESSIONID inside your Javascript...is a bad idea...session_id() returns the name of the session (in this case PHPSESSIONID) but it can be changed via the session_id() function as well. So if you can pass the results of session_id() to your javascript that ...
by abeall
Mon Feb 05, 2007 2:24 am
Forum: PHP - Code
Topic: Retrieve JPEG quality?
Replies: 4
Views: 529

Thanks, both, will chew on this.
by abeall
Mon Feb 05, 2007 2:21 am
Forum: PHP - Code
Topic: [SOLVED]How to get SESSION vars from PHPSESSID w/o a cookie?
Replies: 7
Views: 4505

Why are you doing this - the only thing I can think of is your trying to communicate across seperate domains? In which case if your domains are hosted on seperate servers - your screwed. An interesting question. I'm using Flash 8 to upload files via POST data. Sadly, while Flash 8 will send cookie ...
by abeall
Mon Feb 05, 2007 2:15 am
Forum: PHP - Code
Topic: [SOLVED]How to get SESSION vars from PHPSESSID w/o a cookie?
Replies: 7
Views: 4505

Thanks. Interestingly, I have both those pages open in tabs, I guess I'm on the right track. I'm not sure I completely get how session_id() works, but I tried something simple, like this: // authenticate via $_SESSION, or $_GET['sessid'] if provided if($_GET['sessid']){ session_id($_GET['sessid']); ...
by abeall
Mon Feb 05, 2007 12:16 am
Forum: PHP - Code
Topic: Retrieve JPEG quality?
Replies: 4
Views: 529

Retrieve JPEG quality?

I'm uploading images via POST, and resizing them then storing to the file system or a database. I would like to resize JPEGs(and PNGs and GIFs for that matter) in such a way that quality settings do not change -- neither decrease, or increased as it would not help, since the original was already low...
by abeall
Mon Feb 05, 2007 12:13 am
Forum: PHP - Code
Topic: [SOLVED]How to get SESSION vars from PHPSESSID w/o a cookie?
Replies: 7
Views: 4505

[SOLVED]How to get SESSION vars from PHPSESSID w/o a cookie?

I'm working on a project in which I'm facing a situation where I will not be able to send cookie data, but I can send the PHPSESSIONID(as returned by JS document.cookie) via a querystring, like this: script.php?sessid=u92yh54t7356953h6957 The question is, how would I retrieve $_SESSION variables at ...