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:
> >>>
> >>> >>>
> >>> $var = array(array('great','alright'), 'boring');
> >>>
> >>> print "T
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:
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 co
> 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 readabil
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 mainta
[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 int
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,
>
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 n
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: T
> > 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
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
> wri
On Thu, Oct 22, 2009 at 8:40 AM, Thodoris 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
> 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 . Lets say however, t
> 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 pa
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 solut
> 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
> 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 functions/librari
> 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 fo
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 responsi
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
c
I have a script that downloads a sequence of files online. Every hundred
files or so, it fails with:
==
Warning: file_get_contents() []: failed to open stream: A connection
attempt failed because the connected party did not properly respond after a
period of time, or es
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 cod
-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 w
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 s
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:
Make sure you use the triple '=' comparison operator since you need to
check against the type being boolean also.
Ch
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 s
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 goo
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: ' . mys
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:
>
>
> if( ($sFil = file_get_contents( $sURL )) === false )
> {
> // F
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 specif
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
ne
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
box*.
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 v
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, Mars
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
http://forum.p
On Thu, Oct 22, 2009 at 4:14 PM, Philip Thompson 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 I'm experiencing:
Have you run an explain plan on the query?
Bastien
Sent from my iPod
On Oct 22, 2009, at 4:14 PM, Philip Thompson
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
On Oct 22, 2009, at 3:26 PM, Eddie Drapkin wrote:
On Thu, Oct 22, 2009 at 4:14 PM, Philip Thompson > 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 li
On Oct 22, 2009, at 3:30 PM, Phpster wrote:
Have you run an explain plan on the query?
Bastien
Sent from my iPod
Yes, I have. For giggles, I wanted to run it again. Here it is
(slightly stripped down) and it looks good to me.
mysql> EXPLAIN SELECT
-> `p`.`patient_id`,
-> `p`.`add
I'm trying to use the php mail() function to send a mail within a php
script. This is using PHP 5.2.4 and Ubuntu Hardy Heron linux. The
script runs fine and the return value of the mail function is TRUE,
but the mail is never received. I'm trying to send an email to my
gmail account via the local s
The problem is you won't be trusted to deliver mail directly to most
mail servers unless you have a static IP. Even then thats no
guarantee. What you have to do is relay through your ISP's SMTP
server where you're "trusted". You should also be able to setup PHP
to use your ISP's SMTP server and
rect to the Federal
>>>> Trade
>>>> Commission or perhpas the FBI.
>>>>
>>>> Any thoughts on the script and its effectivness?
>>>>
>>>> >>> $deny = array("111.111.111", "222.222.222", "333.333.333");
&
> If you need more control then I suggest you switch from
> file_get_contents() to using curl to retrieve the page. You can then set
> your timeout criteria.
Bingo! That appears to have done it. In fact, not only did it solve the
timeout problem raised in
http://marc.info/?l=php-general&m=12562
he Federal
> >>>> Trade
> >>>> Commission or perhpas the FBI.
> >>>>
> >>>> Any thoughts on the script and its effectivness?
> >>>>
> >>>> >>>> $deny = array("111.111.111", "222.222.222",
How would I determine my ISP's SMPT server ID? And do I need to edit
main.cf in order to use that server?
Also, is there a way to test the script just sending an email locally?
I tried sending the email to use...@localhost, but the email was still
not received.
On Thu, Oct 22, 2009 at 4:15 PM,
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:
if
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:
> 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 mai
i faced the same problem quite a few times.
the general email route is
php script -> sender smtp server -> receiving mail server
in your case path 2 is broken. meaning port 25 is blocked by your ISP
the work around is:
1. see if your ISP provides you with an SMTP account that is not blocked (OR)
Hi,
I am working on reverse engineering for a web project. I was trying to know
that, is there any way(function by PHP, Zend, extension etc)
to find out how many function has been called to perform a task.
If no, can you suggest is it possible/feasible or not?
Thanks in advance
--
Satya
Bangal
65 matches
Mail list logo