php-general Digest 29 Nov 2008 10:41:19 -0000 Issue 5816

Topics (messages 283906 through 283912):

PEAR ExcelWriter corrupt / Bug Report CAPTCHA borked
        283906 by: Richard Lynch

Re: Trre/Drop Down quick app for testing database tbls
        283907 by: Adam Lewis

Re: Curl with asp pages....
        283908 by: ioannes
        283911 by: shiplu

Re: Happy Turkey Day
        283909 by: Per Jessen

Re: Parsing XML
        283910 by: Per Jessen
        283912 by: Ashley Sheridan

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
The PEAR tarball for ExcelWriter is corrupt for 0.9.1, 0.9.0 and 0.8.0

The PEAR bug-reporting system CAPTHCA won't accept the correct answers.

In desparation, I'm reporting this here, hoping somebody from PEAR
reads this and can do something...

$ tar -xvf Spreadsheet_Excel_Writer-0.9.1.tar
package.xml
Spreadsheet_Excel_Writer-0.9.1/Writer.php
Spreadsheet_Excel_Writer-0.9.1/Writer/BIFFwriter.php
Spreadsheet_Excel_Writer-0.9.1/Writer/Workbook.php
Spreadsheet_Excel_Writer-0.9.1/Writer/Format.php
Spreadsheet_Excel_Writer-0.9.1/Writer/Worksheet.php
Spreadsheet_Excel_Writer-0.9.1/Writer/Parser.php
Spreadsheet_Excel_Writer-0.9.1/Writer/Validator.php
tar: A lone zero block at 576

pear install xyz

will NOT work due to firewall/proxy/policy at work.


-- 
Some people ask for gifts here.
I just want you to buy an Indie CD for yourself:
http://cdbaby.com/search/from/lynch



--- End Message ---
--- Begin Message ---
2008/11/28 Adam Lewis <[EMAIL PROTECTED]>

>
>
> 2008/11/28 bruce <[EMAIL PROTECTED]>
>
> Hi.
>>
>> I've got a few tbls that I'm testing. I'd like to have a simple web app to
>> be able to iterate through the tbls to test out what I have in them.
>>
>> I'd like to be able to have each tbl as a drop-down/select box, so I
>> select
>> from selecta, which lists items from TBL-A, which then uses the id from
>> TBL-A, to get the items from TBL-B that matches. Selecting from drop-down
>> for TBL-B, then gets me the list on TBL-C...
>>
>> I've got 3-4 tbls that are linked by their id.
>>
>> Rather than reinvent the wheel, I'm asking if anyone has a quick app that
>> they can point to that I can extract/modify the functionality for my
>> needs...
>>
>> thanks
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>

--- End Message ---
--- Begin Message ---
Andrew Ballard wrote:
On Fri, Nov 28, 2008 at 9:59 AM,  <[EMAIL PROTECTED]> wrote:
The one thing that's always tripped me up with ASP sites is that you have to add EVERY 
input, even the type="submit" with the correct value from the one and only 
submit button on the page.

Again, I think that's the ASP.NET part.
Not sure what the ASP code monkeys are doing with their point-and-click UI, but 
I presume it's just a boilerplate operation that needs the submit input just in 
case they add a second button some day.

I've had the same problem with Zend_Form, honestly.


The variable names shouldn't need URLencoding in any proper webapp, but try it 
and see.

Well, they either need to contain valid URL characters or they need to
be encoded. If you have a variable name that contains an equal sign
(crazy, but can be technically valid since names are just strings --
to me it seems little less crazy than including square brackets in a
variable name in HTML) it will have to be escaped.

Use Firefox LiveHTTPHeaders to see what goes back-n-forth on a real working 
exchange as well.

I agree. It's definitely a lifesaver. FWIW, there is a similar tool
for IE too, if you ever find yourself stuck for one of those lovely
cases where the site works fine in Firefox but not in IE.

Andrew

I agree too. Thank you, those responses were very useful, in particular Firefox LiveHTTPHeaders. This gives the full post variables on the submission of the form, using this I could get a correct response and work back, compare the syntax and very carefully substitute my own variables. I found that the code I was using to get the VIEWSTATE was in fact correct:

preg_match('/<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="([^"]*?)" \/>/', $html, $matches); //- from php.net curl php with slight amendment
   $viewstate = $matches[1];
   $viewstate = urlencode($viewstate);


but Firefox LiveHTTPHeaders then helped enormously in putting all the other variables in the right place and avoid errors. I also found out that the server was doing a logic check on one of the variables (December was returned as 11 for the javascript calendar) which became obvious once everything else was working.
John

--- End Message ---
--- Begin Message ---
When you are dealing with curl, anything can be done as long as its a HTTP
request.Its all about sending HTTP headers and content.

To parse HTML content you can use HTML parser. Regular expression may not
work each time.
Pattern changes over time.

Download Wireshark. Collect 2 sample request and response packet from
there.
Make a format and use it with CURL.
Thats it. So Simple. You never gonna  need to know who is generating the
site, PHP or ASP.NET.


-- 
A K M Mokaddim
http://talk.cmyweb.net
http://twitter.com/shiplu
Stop Top Posting !!

--- End Message ---
--- Begin Message ---
tedd wrote:

> At 5:26 PM +0000 11/27/08, Ashley Sheridan wrote:
>>For anyone who has no idea who Mr Bean is:
>>
> 
> I've always liked Mr Bean -- there's a bit of him in all of us.
> 
> However, I saw a performance done by him about Americans that was a
> bit over-the-top. The skit centered on how fat Americans were.

Well, they are a bit over-the-top ...

> I am sure if he ran that skit in a trailer for one of his movies in
> the States, the attendance for his movie would drop -- a bit like
> biting the fat-hand that feeds him.

Just one of many. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Andrew Ballard wrote:

>> XSL will only allow me to convert it into a different document
>> format, which is not what I want as I need to keep a local copy of
>> information in a database for searching and sorting purposes. Nathans
>> class allows me to have the entire document put into an array tree,
>> which is fine for what I need so far.
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
> 
> A bit over the top, but you could always use XSL to turn it into CSV. 
>  LOL
> 
> Andrew

Not over the top at all if your database understands CSV.  I think it is
very odd that no-one else is advocating XSL in this case.  Extracting
information from an XML file is just another way of converting it,
which is exactly what XSL is good at.  I can't imagine how using a pile
of custom PHP code is going to be more efficient than writing a simple
XSL stylesheet according to recognised standards etc.  Just my opinion
of course. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
On Fri, 2008-11-28 at 20:39 +0100, Per Jessen wrote:
> Andrew Ballard wrote:
> 
> >> XSL will only allow me to convert it into a different document
> >> format, which is not what I want as I need to keep a local copy of
> >> information in a database for searching and sorting purposes. Nathans
> >> class allows me to have the entire document put into an array tree,
> >> which is fine for what I need so far.
> >>
> >>
> >> Ash
> >> www.ashleysheridan.co.uk
> > 
> > A bit over the top, but you could always use XSL to turn it into CSV. 
> >  LOL
> > 
> > Andrew
> 
> Not over the top at all if your database understands CSV.  I think it is
> very odd that no-one else is advocating XSL in this case.  Extracting
> information from an XML file is just another way of converting it,
> which is exactly what XSL is good at.  I can't imagine how using a pile
> of custom PHP code is going to be more efficient than writing a simple
> XSL stylesheet according to recognised standards etc.  Just my opinion
> of course. 
> 
> 
> /Per Jessen, Zürich
> 
> 
That would destroy the relationship of the data, as it id in no
structure that would be easy to port to a CSV format.


Ash
www.ashleysheridan.co.uk


--- End Message ---

Reply via email to