Re: [PHP] cURL: can't prevent url redirect

2006-11-29 Thread Andrew Warner
oops... I see my mistake: foreach($restored_cookies as $name=>$value) array_push($the_headers, "Cookie: ".$name.'='.$value); should be: $cookie=''; foreach($restored_cookies as $name=>$value) $cookie .= "$key=$value; "; $cookie = substr ($cookie,0,-2); Then ei

Re: [PHP] cURL: can't prevent url redirect

2006-11-29 Thread Andrew Warner
Actually, the problem is that the site isn't recognizing my cookies. Is there anything wrong with the below code? Same thing in Snoopy works perfectly. Going to stick with Snoopy. $the_headers = array( "Language: en", "Accept: */*", "User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS

[PHP] cURL: can't prevent url redirect

2006-11-29 Thread Andrew Warner
This login script works when I use Snoopy (php http class), but here with php curl the response is the redirected page. The script is following a 302 redirect and I don't want it to because I need some header info from the 302 page. The curl_setopt($ch, CURLOPT_MAXREDIRS, 0); doesn't seem t

[PHP] PowerPoint to html converter, server-side

2004-02-16 Thread Andrew Warner
I'm looking for a PowerPoint to html/slides converter that can work server-side and on Linux. Does such a thing exist? Most of the converters I've come across are desktop apps. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] read session data without starting session

2003-11-26 Thread Andrew Warner
I have a script that browses a sessions table and extracts and displays the session values for display. The function below (I don't remember where I got it) extracts session data without starting a session, but it doesn't handle session values that are arrays. Anyone have something like this th

[PHP] php cgi configuration w/ htaccess

2003-10-20 Thread Andrew Warner
My ISP hosted website uses the php apache module version, but I'm trying to use php cgi version for the part of my site edit application that actually creates and edits files on the site. This will avoid all the permision and chmod hassle when php tries to create and edit files. My ISP has plac

[PHP] Re: Header, Directory, and SESSIONs

2003-06-21 Thread Andrew Warner
At 9:43 AM +0300 6/21/03, nabil wrote: 4- I want if any user jumped to the other directory and logged in with the correct requested password TO HAVE THE FIRST SESSION UNREGISTERED automatically, so he can't be logged in in both at same time.. and keep only the new.. and ofcourse have to re logging

[PHP] manually unserializing session data

2003-06-14 Thread Andrew Warner
How do you manually unserialize session data? Using unserialize() on session data from a sessions table is not working for me. I have modified the gc function of my MySQL session handler to save data from expired session records to another table, 'sessions_saved'. I can get the session data

[PHP] regex: line breaks to w/exclusion

2003-06-05 Thread Andrew Warner
I'm using this snippet to turn line breaks into tags: preg_replace("/(\015\012)|(\015)|(\012)/","\n",$page['CONTENT']); It works fine, but I'd like it to ignore text between tags. andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] conditionaly including classes/functions

2002-04-05 Thread Andrew Warner
Is it okay practice to condtionally include php files that contain only classes or functions (as opposed to just straight code)? The result is a class or function inserted right in the middle of an if{} block: } elseif ($var=='a') { include('temp.php'); $obj = new foo; echo