Hi,
I'd like to convert a jpg image to a pdf document using the fpdf class.
(www.fpdf.org).
here is the code :
?php
require(fpdf.php);
$image=/pat/to/image.jpg;
$pdf = new FPDF();
$pdf-open();
$pdf-image($image,0,0);
$pdf-Output(/path/to/image.pdf,'F');
?
but I only get a blank a4 pdf
Peter Lauri a écrit :
Correct me if I am wrong, but do fpdf allow jpg? I think you must convert to
PNG or GIF and then use that image.
I correct you.
FPDF allow jpg.
take a look at ttp://www.fpdf.org/en/doc/image.htm
Supported formats are JPEG and PNG.
N F
--
PHP General Mailing List
Peter Lauri a écrit :
This is code how it works for me:
$pdf = new FPDF('p','pt','a4');
$pdf-AddPage();
$pdf-Image(pdf/profilechart.png,145,$pdf-GetY());
$pdf-Output(pdf/temp/thepdf.pdf,'F');
Add the $pdf-AddPage(); and it might work :)
addpage did the trick.
thanks peter.
next question
Hi,
I'd like to set a captcha on my web server(s).
The code works quite fine, but I'd like to blacklist (for an amount of
time) the ips that failed
with the captcha x times.
The web server works with an SQL server, but I cannot ask the page to
check for each IP
with a request to the
Mathijs a écrit :
Hello there,
I Have an problem with UTF-8 and XML.
I Output perfect XML (according to IE, Opera and Firefox).
I use the Content-Type header with text/xml; charset=utf-8.
For some reason this breaks UTF-8 output.
When i remove it it works. But i need the text/xml header.
Hi,
$timeDiff=$lastTime-$firstTime;
// return the difference
return $timeDiff;
}
//Usage :
echo timeDiff($start,$finish);
Thanks
Chris
Nicolas Figaro http://www.sdv.fr [EMAIL PROTECTED] mailto:[EMAIL
PROTECTED]
SDV plurimédia
--
PHP General Mailing List (http://www.php.net
weetat a écrit :
Hi ,
Thanks for your info.
I am new in PHP , how to remove the the space and '(',')' ?
hi,
$newstring = str_replace( ,_,$string);
$newstring = str_replace(,,_,$newstring)
hope this'll help
N F
Thanks
Sameer N Ingole wrote:
Sameer N Ingole wrote:
weetat wrote:
Antonio Bassinger a écrit :
Dear ALL,
I've an binary file with special (non-printable) characters including ''
'/' ''. I retrieve this file from the database, into a variable
$binaryFILE.
$binaryMS = explode(,$binaryMMS);
foreach ($binaryFILE as $ii)
{
echo $ii;
try this :
echo
Bartlomiej Szymanski a écrit :
Hello,
Hi
I have a problem with message delivery via Postfix. I build a network,
using VMware, consisting of three standalone FreeBSD machines.
I named them: FREEBSD1, FREEBSD2 and FREEBSD3.
do you know postfix has also a very good mailing list ?
On each of
/me really need some sleep ...
N F
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Pham Huu Le Quoc Phuc a écrit :
Hi!
Hi,
I want to build a Web Service in PHP.
cool !
Could you give me some explain about this problem.
Have any framework of Web service in PHP?
could you give us some infos about the web service you'd like to build ?
Please help me!
N F
--
Chris a écrit :
Schalk wrote:
Greetings All,
Can someone please point me to a tutorial or open source 'library'
that will explain how one can upload a .zip file and then extract
it's contents and store this on the server and/or database using PHP.
This will unzip a file:
Hi,
did you try to open the javascript console in firefox to see if there is
any error ?
(in the tools or outils menu).
hope this'll help / bon courage
N F
David BERCOT a écrit :
Hi,
I am blocked on this problem since so a long time that I prefer asking here my
question...
I'd like, if
BBC a écrit :
Hi all...
I'm interesting in a page (using PHP script) in internet,
and I'd like to download that page with the complete script.
the question is:
Can I..?
Hi,
you can't directly.
you have to ask the webmaster of the site.
but the source code won't be helpfull if the script
I had many troubles with ftp_nlist since I discovered the -a option.
try this :
$buff = ftp_nlist($conn_id,-a);
N F
James Nunnerley a écrit :
I'm trying to create some functionality which requires FTPing onto another
server, using the php functions.
Doing the following comes up with a
James Nunnerley a écrit :
Nope - unfortunately, no change, still the same problems, logging in but no
ftp_nlist or indeed ftp_rawlist
even with a pathname ?
ftp_nlist($conn_id, -a /)
do you have any log on the server ?
( you can also sniff the network to watch what php sends).
NF
Cheers
Hi,
I'd like to convert a string generated by a mail client like the
following one :
test nf =?ISO-8859-15?Q?=E9_123456789012?=
back to the original one
test nf é 123456789012.
Is there a (simple) way to do this ?
thanks
N F
--
PHP General Mailing List (http://www.php.net/)
To
Dave M G a écrit :
PHP List,
Pretty standard.
But what do I do when I want to do the same kind of while loop not
with a MySQL result, but with just a regular array?
while (variable = ($array)){
echo $variable[text1];
echo $variable[text2];
}
did you try something like this ?
foreach
Dave M G a écrit :
PHP List,
My hosting service allows me enough access to do things like handle my
own upgrades and full administrative access. Usually, because I am
more of a web designer than an server administrator, I get their
support staff to manage upgrades and installations.
Ross a écrit :
I want to set a page number of a page
if(!isset($_REQUEST['page'])) {
$page =$_REQUEST['page'] + 1;
echo page is .$page; // this echos out page is 1
}
The problem is when I try and use $page further down in the body $page is 0
Question ?=$page; ? BR /
? echo page is.$page; ?
nicolas figaro a écrit :
Ross a écrit :
I want to set a page number of a page
if(!isset($_REQUEST['page'])) {
$page =$_REQUEST['page'] + 1;
echo page is .$page; // this echos out page is 1
}
The problem is when I try and use $page further down in the body
$page is 0
Question ?=$page
BBC a écrit :
Hii all
I just joined this forum, I'm beginner of PHP programming.
welcome.
I didn't understand almost all the syntax you're talking about (ups
too honest, right?), so please...
Does anyone have a kinds of references like soft books or something,
which talk about all the
sam a écrit :
$str='bass electric organ bagpipes';
$parser($str);
$query=SELECT * FROM table WHERE tb_instr = bass
AND tb_instr = electric organ //quoted phrase
AND tb_instr = bagpipes;
Anybody know where I can just copy code that will do the above?
you wish to split $str and
tedd a écrit :
Hi gang:
Hi
I have a question regarding php and security. My apologies beforehand if this
is common knowledge to everyone except me.
I have a php application sitting at root level on one of my servers who's sole
function is to send me an email whenever it's run. So,
Jonas Rosling a écrit :
Not so sure if I've tried to work this out before in this list.
I'm trying to make an array name by a field/row value and assigning values
to it. But I'm having some problems getting it to work.
Is it possible to do this? And if, what am I doing wrong? Or is there any
Mark Sargent a écrit :
Hi All,
I get this,
Not Found
The requested URL /movie1.php was not found on this server.
Apache/2.2.0 (Fedora) Server at localhost Port 80
when setting session.save_path to /tmp in
[EMAIL PROTECTED] a écrit :
Hello,
I've a quite simple question : one of my PHP script executes a Perl script which
outputs a lot of text. My wish is to redirect PHP stdout stream to NULL,
executing the perl script, and after this make the stdout stream back to
normal. I've not found a solution
[EMAIL PROTECTED] a écrit :
Thanks for your answer. I already have thought about your solution. The problem
is I have to use the Perl module for PHP. An example :
$perl = new Perl();
$perl-require('mct.pl');
$perl-MCT_polling();
where MCT_polling() is a function of my script mct.pl. I would
Jonas Rosling a écrit :
Hi,
I've been building a site with PHP 5 on my develop machine. I've been woring
alot with session handling. For example I've been using session_start() now
and then depending on where the user/vistor are or are doing.
But now I've moved the site to a host server with PHP
FAURE, Bruno (PCO TECHNOLOGIES) a écrit :
Hi all,
Hi,
I am looking for a web application that could be used for organizing informal
intranet bets on soccer worldcup 2006.
If it's informal, why can't you use a simple password protected
spreadsheet (excel, openoffice, or the format you
Pham Huu Le Quoc Phuc a écrit :
Hi!
hi,
you don't need to send the mail to me + copy to the list.
I have a error, please see attach image file
I use php 5.0, CakePHP and IIS, Windows XP, IE 6.0
Please help me.
1st : read the html source of your page.
2nd : find in the source the code
Tony Aldrich a écrit :
Hello!
What are the reasons of slow mail() (about 30-40 seconds)?
Hi,
many reasons, but nothing related to php IMHO.
mail relay load, slow reverse dns interrogations for spam, etc.
If your mail runs only on a local or corporate network, ask the mail admin,
otherwise,
Mauricio Pellegrini a écrit :
Hi all
I'm trying to execute two querys and they execute perfectly in fact,
but after the execution of the first query there suposed to be some
variable setted to a certain value.
The problem is this variable is not available at the time the second
query runs.
Mauricio Pellegrini a écrit :
$quer1 = SET @var1=3 ;
SELECt * from table1 Where [EMAIL PROTECTED] ;
This gave a syntax error from MySQL inmmediately before the ;
(semicolon),
did you try to run the query above
( SET @var1=3 ; SELECt * from table1 Where [EMAIL PROTECTED] )
.
(I'll check the code to be sure).
If I can make sure the PATH_INFO isn't used anywhere in the code, is
there a way to
change the config in order to generate a 404 for each url with a not
null PATH_INFO ?
Nicolas Figaro
Joe Wollard a écrit :
I believe Kevin is on the right track there. To expand
because my own site does the same and I
wanted to be sure it didn't come from my config.
thanks
Nicolas Figaro
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Barry a écrit :
Hello Everyone!
What would be the best way to start a PHP Script via CRONJOB?
Should i use the 'php' command or use curl or lynx or something to
open that URL?
Hi,
unless you need to be sure the http server is up and running, it's a
better way to run your script via a
William Stokes a écrit :
Can someone help me to get started with serializing? I think I did'nt quite
understand the manual here...
serialize and unserialize don't modify your variable, but the return
value is a string or a mixed (which means it can be a very complicated
structure, or a
William Stokes a écrit :
Hello,
I'm updating a table with following SQL statement
$sql = INSERT INTO x_ikaluokat (ryhma, ikaluokka)
VALUES ('$ryhma','$ikaluokka');
What would be the best way to test that similar rows doesn't get created to
the table? I can't make both columns unique.
Pham Huu Le Quoc Phuc a écrit :
I catch an error, could you tell me if you have some ideas?
class Dsptraining extends AppModel
{
function GetDsptrainings()
{
return $this-findBySql(select max(start_date) start_date from
tbl_dsptrainings);
}
}
did you try your sql
Merlin a écrit :
Hi there,
I would like to output following text with php:
?xml version=1.0 encoding=ISO-8859-1 ?
How can I do that? I tried to escape the ? with \? but this did
not help.
htmlentities perhaps ?
N F
Any ideas?
Thank you for any hint,
Merlin
--
PHP General Mailing List
be a returning code with a
message. (but it hasn't been fixed yet).
Thanks a lot.
Nicolas Figaro
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mark a écrit :
I havnt even tried this query but i know its wrong can anyone help!
***
?php
include(header.php);
include(connect.php);
don't you need a session_start() somewhere ?
(or it's in the header.php or connect.php perhaps ?)
$comp_id =
Chris a écrit :
nicolas figaro wrote:
Hi
I'm using php 4.3.11 on linux RH9.
I'd like to open a .Z archive with gzopen.
I looked at the options of gzopen, but I'm not sure there is a way to
specify the compression used by compress/uncompress.
Has anyone ever tried and done this yet
Nicolas Figaro
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Nicolas Figaro
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
46 matches
Mail list logo