php-general Digest 14 Mar 2006 15:31:22 -0000 Issue 4015
Topics (messages 231885 through 231896):
Re: Printing library in PHP ?
231885 by: Manuel Lemos
Re: Looking for PHP SSO-engine
231886 by: Manuel Lemos
PHP code not functioning on search page
231887 by: Bruce Gilbert
Re: X-Mailer and headers when sending mail
231888 by: Paul Scott
231889 by: Angelo Zanetti
Re: Hidding HTML Input Elements values approach
231890 by: David Dorward
Re: Convert all named entities into numeric character references
231891 by: Jacob Friis Saxberg
Automatic authentication using browser's certificate
231892 by: DeMZed
Re: array_search and multi-dimensional arrays
231893 by: List Manager
231895 by: M. Sokolewicz
Re: Editing an existing pdf?
231894 by: Meron
Hostname Filtering
231896 by: Dan
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 ---
Hello,
on 03/13/2006 09:44 AM robert mena said the following:
> I am currently migrating an application originally written with Delphi to
> PHP. Everything is going fine except the printing of the reports that does
> not produce the same visual result (i.e does not look the same or has some
> aligmment issues).
>
> From what I've read I should use CSS to achieve such result but I was
> wondering if there is any toolkit, library in PHP that would ease my work.
>
> For example:
> I have a specific report I have to add a header to each page
> I have another one with tabular data that when the result is larger than a
> page I should break the table and start at the next page so the table
> headers can be seen again...
>
> In both I'd need a way to decide/find out how many pages will be necessary
> (given the size of the paper sheet) so I could generate the HTML correctly.
You did not mention the platform you want to print, nor if you want to
print on the client side or server side.
If you want to print on the server side, you may want to take a look at
this IPP (Internet Printing Protocol) client class that can be used to
print HTML documents on Windows and Linux (with CUPS).
http://www.phpclasses.org/printipp
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
Hello,
on 03/13/2006 09:56 PM Roger Thomas said the following:
> Are there are PHP projects that focuses on Single Signon/Signoff like
> Pubcookie, CAS, Cosign etc? Please advise. TIA.
I am not sure, but I think LiveUser is for that purpose:
http://pear.php.net/package/LiveUser/
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
I have a bit of PHP rotating image code and time stamp that work fine
on every page except my search page
http://inspired-evolution.com/search.php. I installed a PHP based
search engine called Zoom Search as a plug-in in Dreamweaver. Since
the code works on every other page, I am not sure why it wouldn't on
this page. An example of a page where the code works fine is
http://inspired-evolution.com/search_template.php
Any assistance?
--- End Message ---
--- Begin Message ---
On Mon, 2006-03-13 at 13:41 -0800, Angelo Zanetti wrote:
> * 0.5 X_PRIORITY_HIGH Sent with 'X-Priority' set to high * 1.3
> MSGID_NO_HOST Message-Id has no hostname * 2.0
> HEADER_COUNT_CTYPE Multiple Content-Type headers found * 0.8
> PRIORITY_NO_NAME Message has priority setting, but no
> X-Mailer * 1.8 INVALID_MSGID Message-Id is not valid, according to RFC 2822
>
Looks like setting X-Mailer should do the trick
--Paul
--- End Message ---
--- Begin Message ---
Paul Scott wrote:
On Mon, 2006-03-13 at 13:41 -0800, Angelo Zanetti wrote:
* 0.5 X_PRIORITY_HIGH Sent with 'X-Priority' set to high * 1.3 MSGID_NO_HOST
Message-Id has no hostname * 2.0
HEADER_COUNT_CTYPE Multiple Content-Type headers found * 0.8 PRIORITY_NO_NAME
Message has priority setting, but no
X-Mailer * 1.8 INVALID_MSGID Message-Id is not valid, according to RFC 2822
Looks like setting X-Mailer should do the trick
--Paul
Thanks again!!
--- End Message ---
--- Begin Message ---
pedro mpa wrote:
> So, for example a typical country select box, its option values are
> encrypted with the previous created key on page request and decrypted
> (after form submission f.ex.) on the validation code:
So the value attribute contains an encrypted representation of the country
name ... which is transmitted in clear text right next to it?
If you want encryption, why not just use SSL?
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
--- End Message ---
--- Begin Message ---
Thanks, I could also use Tidy and make it do the convert.
Jacob
On 3/9/06, Robin Vickery <[EMAIL PROTECTED]> wrote:
> On 06/03/06, Jacob Friis Saxberg <[EMAIL PROTECTED]> wrote:
> > > > Does anyone know of a Php funtion that can do this:
> > > > http://golem.ph.utexas.edu/~distler/blog/NumericEntities.html
> > > Hi there!
> > >
> > > http://se.php.net/manual/en/function.htmlentities.php
> > >
> > > ?
> >
> > htmlentities converts to named entitites. I want it to numeric entities.
>
> This is probably the simplest way of doing it; write a simple function
> that translates entity names to numbers, then start an output buffer
> at the beginning of your script using the function as an output
> callback function. Then everything after that automatically gets
> converted.
>
> In fact it's so simple, I'll do it for you...
>
> Code posted to pastebin:
>
> http://robinv.pastebin.com/592400
>
> -robin
>
--- End Message ---
--- Begin Message ---
Hi all,
I would like to setup a login authentication based on users'
certificates bundled into the customer's browser.
I've added a valid SSL Certificate in my browser, signed with a
third-party CA, and I would like that the user connected to my website
would be automatically authenticated if his cert is OK for me (without
typing any password).
Have you got any idea ou do you know any framework to develop this in PHP ?
Thanks
DeMZed
PS / Please visit CA-Cert.org for free community (& certificates)
around SSL Authentication
--- End Message ---
--- Begin Message ---
jonathan wrote:
I'd like to return the first key value in the following array such
that England would return 1 rather than 3 which is the second key
value. Any help would be greatly appreciated.
$c[1][]="Vietnam";
$c[1][]="China";
$c[1][]="Thailand";
$c[1][]="England";
$c[2][]="USA";
$c[2][]="Japan";
print_r($c);
// Array ( [1] => Array ( [0] => Vietnam [1] => China [2] => Thailand
[3] => England ) [2] => Array ( [0] => USA [1] => Japan ) )
foreach($c as $row)
{
echo array_search("England",$row);
}
// prints 3
-jonathan
--PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
give this a shot
<?php
function findIndexof($ar, $str) {
foreach($ar AS $k => $v) {
if ( is_array($v) ) {
$val = findIndexof($v, $str);
if( $val !== false ) {
return $val;
}
} elseif ( strtolower($v) == strtolower($str) ) {
return $k;
}
}
return FALSE;
}
$c[1][] = "Vietnam";
$c[1][] = "China";
$c[1][] = "Thailand";
$c[1][] = "England";
$c[2][] = "USA";
$c[2][] = "Japan";
echo findIndexof($c, 'Vietnam');
?>
You should be able to search arrays of any depth
Hope this woks for you.
Jim
--- End Message ---
--- Begin Message ---
List Manager wrote:
jonathan wrote:
I'd like to return the first key value in the following array such
that England would return 1 rather than 3 which is the second key
value. Any help would be greatly appreciated.
$c[1][]="Vietnam";
$c[1][]="China";
$c[1][]="Thailand";
$c[1][]="England";
$c[2][]="USA";
$c[2][]="Japan";
print_r($c);
// Array ( [1] => Array ( [0] => Vietnam [1] => China [2] => Thailand
[3] => England ) [2] => Array ( [0] => USA [1] => Japan ) )
foreach($c as $row)
{
echo array_search("England",$row);
}
// prints 3
-jonathan
--PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
give this a shot
<?php
function findIndexof($ar, $str) {
foreach($ar AS $k => $v) {
if ( is_array($v) ) {
$val = findIndexof($v, $str);
if( $val !== false ) {
return $val;
}
} elseif ( strtolower($v) == strtolower($str) ) {
return $k;
}
}
return FALSE;
}
$c[1][] = "Vietnam";
$c[1][] = "China";
$c[1][] = "Thailand";
$c[1][] = "England";
$c[2][] = "USA";
$c[2][] = "Japan";
echo findIndexof($c, 'Vietnam');
?>
You should be able to search arrays of any depth
Hope this woks for you.
Jim
Or, a lot easier:
foreach($c as $key=>$row) {
if(false !== array_search("England",$row)) {
echo $key;
}
}
--- End Message ---
--- Begin Message ---
It worked fine and does fill well except when it comes to the downloading of
the file. I tried to provide a hyperlink so that the fdf will be downloaded
as a filled pdf when the link is clicked in internet exploreer. I also make
sure that this particular file type is downloaded with acrobat reader using
the options in the browsers.
For a reason I cannot understand there is a pop up error message saying that
the fillabe pdf file is not found ... . I also have attached this dialog box
as jpg.In netscape it is far worse - it opens the fdf file on the browser.
Please help on how I can solve this.
Regards
--
View this message in context:
http://www.nabble.com/Editing-an-existing-pdf--t1202479.html#a3394172
Sent from the PHP - General forum at Nabble.com.
--- End Message ---
--- Begin Message ---
I have a few PHP scripts where I log hit to a page i.e. IP and
hostname via a look up.
What I want to do is create essentially a blacklist to prevent bots
and other hosts and IP from being logged and skewing my stats. My
local IP/host and the MSN and Googlebot hits should not be in my
stats or at least I can flag them to hide them.
For example:
$blacklist = array(
'*.wavefront.ca',
'*.googlebot.com',
'msnbot.msn.com',
'*.inktomisearch.com',
'68.146.96.245'
);
So lets say I have my host:
$host = 'lj602144.inktomisearch.com';
I want to quickly parse this array and return a simple boolean if I
am in the blacklist. I could create a loop and cycle through the
array valves and to a regex on each but I was hoping someone would
have a more elegant solution.
Thanks,
Dan T
--- End Message ---