php-general Digest 22 Oct 2009 05:59:45 - Issue 6403
Topics (messages 299157 through 299180):
Re: How to pronounce PHP code over the phone?
299157 by: tedd
299163 by: Daevid Vincent
Re: Sanitizing potential MySQL strings with no database connection
299158
This is always safe to use variables like this...
$text = This is . $variable;
Or
$text = This is . $variable[0];
Regards,
Samrat Kar
FRD, BARC
Tel: 022-25597295
Alternate Email: esam...@yahoo.com
-Original Message-
From: Kim Madsen [mailto:php@emax.dk]
Sent: Thursday,
On Thursday 22 October 2009 06:56 AM, Daniel Echalar wrote:
Hi,
Does anybody knows a web services server based on PHP?
The only one a see is Nusoap, but even for this one i can't find the webpage
to see the documentation.
by the way, i'm trying to develop an application using web services in
Hi,
I need to transform some XML files and have not really done much
XSLT. I am looking for recommendations on ways to parse XML via
PHP. The XML files I have contain the content from our website CMS.
We are switching from a proprietary CMS to Drupal and I need to
transform the XML
On Wed, 2009-10-21 at 23:11 +0200, Kim Madsen wrote:
Ashley Sheridan wrote on 2009-10-21 22:56:
Try this though:
?php
$var = array(array('great','alright'), 'boring');
print This is $var[0][0].;
Print This is different from your previous example :-);
--
Kind regards
Kim
On Thu, 2009-10-22 at 09:53 +0300, Thodoris wrote:
On Wed, 2009-10-21 at 23:11 +0200, Kim Madsen wrote:
Ashley Sheridan wrote on 2009-10-21 22:56:
Try this though:
?php
$var = array(array('great','alright'), 'boring');
print This is $var[0][0].;
Print
Curly brackets are usually highlighted as well so it is a good practice,
generally speaking, to use them for double quoted strings and maintainability
increase automatically.
Regards
From: esam...@barc.gov.in
To: php-general@lists.php.net
Date: Thu, 22 Oct 2009 11:31:53 +0530
Subject: RE:
Erm, the braces are meant to go *around* the variable, not around a
bit of it:
print Test: {$var[0][0]};
Thanks,
Ash
http://www.ashleysheridan.co.uk
In many cases braces can go around the variable name not the necessarily
around the whole variable (like the bash scripts). Those are
Erm, the braces are meant to go *around* the variable, not around a bit
of it:
print Test: {$var[0][0]};
unrelated, just another usage of curly brackets
$_ = 'abc';
$i = 0;
echo $_{++$i}; // b
Regards
So no they are not meant to go around. You can use them this way as well.
that has almost the same meaning of
$_ = '_POST';
echo count($$_);
which again, for readability brackets are suggested to improve maintainability
$_ = '_POST';
echo count(${$_});
Regards
So no they are not meant to go around. You can use them this way as
well.
that has almost the same meaning of
$_ = '_POST';
echo count($$_);
which again, for readability brackets are suggested to improve
maintainability
$_ = '_POST';
echo count(${$_});
Regards
Using the same type way as before in this thread.
This was supposed to come out as using the same way of thinking.
But the English-Nerdish dictionary came out...
--
Thodoris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I don't think it is about readability:
$arr[3] = 'test';
$test = 3;
//This prints $test
echo This doesn't work: $$arr[3];
//This prints 3
echo This works: ${$arr[3]};
Using the same type way as before in this thread.
Above example is a classic one where readability and
I don't think it is about readability:
$arr[3] = 'test';
$test = 3;
//This prints $test
echo This doesn't work: $$arr[3];
//This prints 3
echo This works: ${$arr[3]};
Using the same type way as before in this thread.
Above example is a classic one where readability and
[snip] I need to transform some XML files and have not really done much
XSLT. I am looking for recommendations on ways to parse XML via
PHP. The XML files I have contain the content from our website CMS.
We are switching from a proprietary CMS to Drupal and I need to
transform the XML
Hi,
I want to be able to get a screenshot of a given website on the fly.
Can you give me any suggestions.
Thank you
resea soul wrote:
Hi,
I want to be able to get a screenshot of a given website on the fly.
Can you give me any suggestions.
http://sourceforge.net/projects/khtml2png/
It might already be in your favourite Linux distro's repositories also.
Cheers,
Rob.
--
http://www.interjinn.com
Application
What you see is what a browser engine renders for your eyes while what you can
do with PHP is a snapshot of the source code.
Regards
Date: Thu, 22 Oct 2009 09:28:15 -0400
From: reseas...@gmail.com
To: php-general@lists.php.net
Subject: [PHP] Create a screenshot of a website
Hi,
I
It happens on any file I try so there must be something else going on.
Thanks!
Floyd
On Oct 21, 2009, at 4:17 PM, Shawn McKenzie wrote:
Floyd Resler wrote:
For some reason I'm getting a Text file busy error when I try to
execute
PHP scripts from the command line now. It used to work, but
Andrea Giammarchi wrote:
What you see is what a browser engine renders for your eyes while what you can
do with PHP is a snapshot of the source code.
One should remember that PHP serves quite well both as a glue language
and as a wrapper language. There is no reason why you can't use PHP to
resea soul wrote:
Thanks,
I checked the faq of their website. They say that I must have an an X
session. I don't host myself my website.
I want something that I can use only by using cpanel. What i want
basically is allow the user to enter the url of a website. And the
script must give him
Rob, I agree, but you are suggesting is khtml2png which is cool, perfect,
fantastic, but it's not PHP, isn't it?
You ask me: I want a snap via PHP
I reply: well, I don't think such thing exists: a render engine entirely
written in PHP and GD2
Maybe we should create one ...
Regards
Date:
Thanks,
I checked the faq of their website. They say that I must have an an X
session. I don't host myself my website.
I want something that I can use only by using cpanel. What i want
basically is allow the user to enter the url of a website. And the
script must give him the
On Thu, 2009-10-22 at 16:17 +0200, Andrea Giammarchi wrote:
Rob, I agree, but you are suggesting is khtml2png which is cool, perfect,
fantastic, but it's not PHP, isn't it?
You ask me: I want a snap via PHP
I reply: well, I don't think such thing exists: a render engine entirely
written
On Thu, Oct 22, 2009 at 8:40 AM, Thodoris t...@kinetix.gr wrote:
I don't think it is about readability:
$arr[3] = 'test';
$test = 3;
//This prints $test
echo This doesn't work: $$arr[3];
//This prints 3
echo This works: ${$arr[3]};
Using the same type way as before in this thread.
GD is just a library that PHP uses, in a similar way that you'd be
utilising what khtml2png can do through PHP. What you just said doesn't
make much sense.
except I cannot find anything in both php.net and pecl websites
Regards
Andrea Giammarchi wrote:
Thanks,
I checked the faq of their website. They say that I must have an an X
session. I don't host myself my website.
I want something that I can use only by using cpanel. What i want
basically is allow the user to enter the url of a website. And the
script must
Andrea Giammarchi wrote:
Thanks,
I checked the faq of their website. They say that I must have an an X
session. I don't host myself my website.
I want something that I can use only by using cpanel. What i want
basically is allow the user to enter the url of a website. And the
script must
-Original Message-
From: resea soul [mailto:reseas...@gmail.com]
Sent: 22 October 2009 14:28
To: php-general@lists.php.net
Subject: [PHP] Create a screenshot of a website
Hi,
I want to be able to get a screenshot of a given website on the fly.
Can you give me any suggestions.
Thank you
Hi Guys,
Well i;ve been slaving on with my PHP XML endeavors and i'm loving it,
just finishing the meaty parts of my XSLT for dummies book too.
I have a question which asks is it possible?.
Using XSLT I can collect specific parts of my XML using something sexy
like xsl:template
I see you are being rather obtuse :|
I use system/shell calls without problems if there is the lib I need.
The problem here is that the question was, in my opinion, the classic: how to
assign javascript var to php (directly)
Indeed he is trying to find a PHP solution, of course with third
Andrea Giammarchi wrote:
I see you are being rather obtuse :|
I use system/shell calls without problems if there is the lib I need.
The problem here is that the question was, in my opinion, the classic:
how to assign javascript var to php (directly)
Indeed he is trying to find a PHP
is
there a way to somehow embed the contents of the xml into the php code
(like using EOF for html), and being able to substitute the
template match string for a variable ?
Any ideas ?
XSLT should be used via modules, as is with match and templates indeed.
The only idea is to save
Given the knowledge (or extremely likely probability) of the
non-existence of a PHP only solution for generating website thumbnails
it follows that my suggestion was absolutely applicable.
I have never said the opposite ... I have just said: pure PHP with standard
core
Hi,
If a windows web server is being used, we've had very good results with the
activex control (use via COM within PHP5) from
http://www.acasystems.com/en/web-thumb-activex/
The developer is very responsive to bug reports / feature suggestions. Full
PHP example code is given for all
On Thu, 2009-10-22 at 17:33 +0200, Andrea Giammarchi wrote:
Hi,
If a windows web server is being used, we've had very good results with the
activex control (use via COM within PHP5) from
http://www.acasystems.com/en/web-thumb-activex/
The developer is very responsive to bug
Andrea Giammarchi wrote:
Given the knowledge (or extremely likely probability) of the
non-existence of a PHP only solution for generating website thumbnails
it follows that my suggestion was absolutely applicable.
I have never said the opposite ... I have just said: pure PHP with standard
I have a script that downloads a sequence of files online. Every hundred
files or so, it fails with:
==
Warning: file_get_contents(URL) []: failed to open stream: A connection
attempt failed because the connected party did not properly respond after a
period of time,
Andrea Giammarchi wrote:
Hi,
If a windows web server is being used, we've had very good results with the
activex control (use via COM within PHP5) from
http://www.acasystems.com/en/web-thumb-activex/
The developer is very responsive to bug reports / feature suggestions. Full
PHP example
-Original Message-
From: Andrea Giammarchi [mailto:an_...@hotmail.com]
Sent: 22 October 2009 16:34
To: networkad...@emarket2.com; php-general@lists.php.net
Subject: RE: [PHP] Create a screenshot of a website
Hi,
If a windows web server is being used, we've had very good results
Matthew Croud wrote:
Hi Guys,
Well i;ve been slaving on with my PHP XML endeavors and i'm loving it,
just finishing the meaty parts of my XSLT for dummies book too.
I have a question which asks is it possible?.
Using XSLT I can collect specific parts of my XML using something sexy
like
Marshall Burns wrote:
I have a script that downloads a sequence of files online. Every hundred
files or so, it fails with:
Check for the return value being equal to false:
?php
if( ($sFil = file_get_contents( $sURL )) === false )
{
// FAIL
}
else
{
//
Matthew Croud wrote:
Hi Guys,
Well i;ve been slaving on with my PHP XML endeavors and i'm loving it,
just finishing the meaty parts of my XSLT for dummies book too.
I have a question which asks is it possible?.
Using XSLT I can collect specific parts of my XML using something sexy
like
Jason wrote:
-Original Message-
From: Andrea Giammarchi [mailto:an_...@hotmail.com]
Sent: 22 October 2009 16:34
To: networkad...@emarket2.com; php-general@lists.php.net
Subject: RE: [PHP] Create a screenshot of a website
Hi,
If a windows web server is being used, we've had very
Hi PHPeople
I have an odd problem at my new work and wonder if it's some sort of odd
setup that is causing this problem when using sessions:
if($test) {
$query = SELECT count(*) FROM articles WHERE group1 = 'fp';# AND
group2 = 'login';
$r = mysql_query($query) or die('Db error: ' .
Robert Cummings wrote:
Marshall Burns wrote:
I have a script that downloads a sequence of files online. Every hundred
files or so, it fails with:
Check for the return value being equal to false:
?php
if( ($sFil = file_get_contents( $sURL )) === false )
{
// FAIL
On 22 Oct 2009, at 16:39, Peter Ford wrote:
Matthew Croud wrote:
Hi Guys,
Well i;ve been slaving on with my PHP XML endeavors and i'm loving
it,
just finishing the meaty parts of my XSLT for dummies book too.
I have a question which asks is it possible?.
Using XSLT I can collect
resea soul wrote on 2009-10-22 15:28:
Hi,
I want to be able to get a screenshot of a given website on the fly.
Can you give me any suggestions.
Do you mean I wanna make a screendump of _my_ website? Then this is
for you: http://dk2.php.net/manual/en/function.imagegrabscreen.php - It
works
Robert and others,
I made that change in the code. It still does not trap the failure. I
believe the reason is that the script is timing out while
file_get_contents() is sitting there waiting for input. The problem is that
the function never returns, so there is no return value to check. What I
On Oct 20, 2009, at 3:44 PM, Kim Madsen wrote:
Philip Thompson wrote on 2009-10-20 21:58:
I got it to draw the different background colors successfully.
However, drawing borders is not as straight forward. I'm sure I
could get it working as well... but I'd rather it work *out of the
Marshall Burns wrote:
Robert and others,
I made that change in the code. It still does not trap the failure. I
believe the reason is that the script is timing out while
file_get_contents() is sitting there waiting for input. The problem is that
the function never returns, so there is no return
Hi Marshall,
the function file_get_contents may have problem with large files.
You could try get the file using fread and feof.
Here i put a example
$contents = '';
while(!feof($stream)){
$contents .= fread($stream, 8192);
}
Gerardo Benitez.
On Thu, Oct 22, 2009 at 12:38 PM,
On Oct 20, 2009, at 1:48 PM, Gary wrote:
NO I have not, I think my issue is I hate when I run across one, it
usually
takes me more than one try to actually figure out what the charactor
is, so
hence my disdain.
GAry
Here are some captchas:
What's three minus two?
Which word is listed
Hi all.
I'm running into a random issue where sometimes it take several
minutes (up to 10 or 15) to complete a query. According to 1 or 2
references, this may be a mysql bug. These links explain the similar
problem I'm experiencing:
http://forums.mysql.com/read.php?24,57257
On Thu, Oct 22, 2009 at 4:14 PM, Philip Thompson philthath...@gmail.com wrote:
Hi all.
I'm running into a random issue where sometimes it take several minutes (up
to 10 or 15) to complete a query. According to 1 or 2 references, this may
be a mysql bug. These links explain the similar problem
On Oct 22, 2009, at 3:26 PM, Eddie Drapkin wrote:
On Thu, Oct 22, 2009 at 4:14 PM, Philip Thompson philthath...@gmail.com
wrote:
Hi all.
I'm running into a random issue where sometimes it take several
minutes (up
to 10 or 15) to complete a query. According to 1 or 2 references,
this may
I have several input fields to update a book database. There seems to be
a conflict in the way tags and text are input through php/mysql and
phpMyAdmin. If I enter the data with phpMyAdmin the input fields in the
php page see quotation marks differently than what is input in phpMyAdmin.
example:
On Thu, Oct 22, 2009 at 06:24:14PM -0700, James Prentice wrote:
How would I determine my ISP's SMPT server ID? And do I need to edit
main.cf in order to use that server?
What ID? There's no ID needed. You just configure postfix to relay any
non-local mail sent to it to the SMTP server at your
Paul M Foster wrote:
On Thu, Oct 22, 2009 at 06:24:14PM -0700, James Prentice wrote:
One other note. People look at me like I'm crazy when I mention this,
but I've seen it quite a bit at various internet mail servers.
Sometimes, in order to accept email from you, the internet mail server
On Thu, Oct 22, 2009 at 11:40:34PM -0500, Shawn McKenzie wrote:
snip
This is fairly accurate in premise but just to clarify. Mailservers
don't operate like this by default and there is really no trust.
There are public blacklists that a mailserver can be configured to use
that tell the
60 matches
Mail list logo