Whats the cleanest (I have a really ugly) way to break this:
[21/Jul/2009:00:00:47 -0300]
into:
date=21/jul/2009
time=00:00:47
Caveats:
1) if the day is < 10 the beginning of the string will look like "[1/...
2) the "-0300" will differ depending on DST or TZ. I don't need it
though, it just ha
know what you are
doing :). My coding is limited to hammering away at the search box on
php.net until I get a push in the right direction. It's just a hack
from there.
Using phpster's substr suggestion has already sped this up considerably.
2009/7/31 Ollisso :
> On Sat, 01 Aug 2009 00
For those of you that remember (not likely but anyway) I am working on
some code that splits CLF records and feeds them into a database.
What I need to do now is automate it.
So what I have is a program (urlsnarf) that redirects its output
(simple "cmd > file.txt") to a file. The script currently
You might find this useful:
http://sites.google.com/site/interrupt0x13h/code/ip2c
On Sun, Oct 18, 2009 at 4:03 PM, SED wrote:
> Hi,
>
> How can I access an index for IP to a country (or a more detailed location)?
> I have not yet found a function for that in PHP nor a free to use website
> that
I need to pipe some data to an external application.
I have this:
while ($row = mysql_fetch_array($theData[0])) {
$src_ip[] = $row[0];
$dst_ip[] = $row[1];
$sig_desc[] = $row[2];
$rec ++;
if ( $rec == $recCount ) {
break;
}
}
for ($i = 0; $i < sizeof($src_ip)
2010 at 9:04 AM, Richard Quadling
wrote:
> On 3 March 2010 13:01, Paul Halliday wrote:
>> I need to pipe some data to an external application.
>>
>> I have this:
>>
>> while ($row = mysql_fetch_array($theData[0])) {
>> $src_ip[] = $row[0];
>&
proc_close($process);
}
thanks.
On Wed, Mar 3, 2010 at 10:08 AM, Ian wrote:
> On 03/03/2010 13:01, Paul Halliday wrote:
>> I need to pipe some data to an external application.
>>
>> I have this:
>>
>> while ($row = mysql_fetch_array($theData[0])) {
>>
I am working on a parser for logs from a spam firewall. The format is
predictable until it reaches a certain point. It then varies greatly.
There are 2 things I want to grab from this area; the size of the
message (if it exists) and the subject (if it exists)
The line might look something like th
Ex:
"This is the string and it is this long"
This is
the string
and it
is this
long
I found some long functions to achieve this but I couldn't help but
think that it could be done in a couple lines.
Possible?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
I have some code that is currently static. It runs via Cron,
generating images which can then be viewed via some other PHP.
What I want to do is allow a user to upload data which I can then pipe
directly into the existing program to produce on the fly images. I am
looking at this:
http://www.php.
I have this:
while ($row = mysql_fetch_array($theData[0])) {
$col1[] = $row[0];
$col2[] = lookup($row[1]); // this goes off and gets the country name.
I then loop through col1 and col2 to produce something like this:
52 ARMENIA
215 CANADA
57 CANADA
261 COLOMBIA
53
On Tue, May 11, 2010 at 2:25 PM, Jim Lucas wrote:
> Paul Halliday wrote:
>> I have this:
>>
>> while ($row = mysql_fetch_array($theData[0])) {
>>
>> $col1[] = $row[0];
>> $col2[] = lookup($row[1]); // this goes off and gets the country name.
>
On Tue, May 11, 2010 at 4:03 PM, Jim Lucas wrote:
> Paul Halliday wrote:
>> On Tue, May 11, 2010 at 2:25 PM, Jim Lucas wrote:
>>> Paul Halliday wrote:
>>>> I have this:
>>>>
>>>> while ($row = mysql_fetch_array($theData[0])) {
>>>
I just spent the last 1/2 hour looking at many different solutions for
this. Is there a universal favorite?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there something that needs to be tweaked or added to get this to
work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see
the connections fail in the servers event logs if I take away \domain
from \domain\username (mixed auth is turned off) so the communication
is somewhat working.
>>
>> What am I missing?
>>
>
> Is the slash before the domain name above just a typo in your e-mail?
> It took a while to get mssql configured to where I could test it here
> since we're using Microsoft's SQL Server Driver for PHP (if you are
> running PHP under Windows, I'd strongly recommend thi
On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday wrote:
>>>
>>> What am I missing?
>>>
>>
>> Is the slash before the domain name above just a typo in your e-mail?
>> It took a while to get mssql configured to where I could test it here
>> since we
nly return 2 rows:
15 | 30
0 | 15547
What am I doing wrong? Is there a more elegant way to achieve what I want?
Thanks.
--
Paul Halliday
Ideation | Individualization | Learner | Achiever | Analytical
http://www.pintumbler.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Jul 30, 2010 at 3:44 PM, Joshua Kehn wrote:
>
> On Jul 30, 2010, at 2:36 PM, Paul Halliday wrote:
>
>> I have a query that may not always return a result for a value, I need
>> to reflect this with a "0". I am trying to overcome this by doing this
>> (
REQUEST['qp'];
What am I missing?
Thanks.
--
Paul Halliday
Ideation | Individualization | Learner | Achiever | Analytical
http://www.pintumbler.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, Sep 2, 2010 at 5:43 PM, Jim Lucas wrote:
> Paul Halliday wrote:
>> I think I just might be missing the logic here.
>>
>> I have a page that is created and within this page, I include an
>> iframe like this:
>>
>> $qp = urlencode("
though.
I think I know what needs to happen, I just cant come up with the logic.
Any push in the right direction would be appreciated.
--
Paul Halliday
Ideation | Individualization | Learner | Achiever | Analytical
http://www.pintumbler.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ot;
Aside from upgrading the second box, is there some other logic that is wrong?
Thanks.
--
Paul Halliday
Ideation | Individualization | Learner | Achiever | Analytical
http://www.pintumbler.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
'global' within each
script/function?
Thanks!
--
Paul Halliday
http://www.pintumbler.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
oing on. But I'd appreciate any advice you may have.
>>
>>
>> Best,
>> tim
>>
> If you check your apache log you'll probably see an error message. But the
> problem seems to be that your string you are trying to echo is enclosed in
> single quotes
in/view/Main/2002068
now what I would like to do is replace inline adding "http://";
. $matches[n] . ">" . $matches[n] . ""
Can this be done or do I need to say loop through matches (there can
be none or many) and do a str_replace.
Thoughts? Other ideas?
Thanks.
;
case 03: $c03 += $c; break;
case 04: $c04 += $c; break;
.
}
}
Works but wow is it ugly..
Thoughts?
--
Paul Halliday
http://www.pintumbler.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, Aug 2, 2012 at 12:27 PM, Ashley Sheridan
wrote:
>
>
> Paul Halliday wrote:
>
>>This is hideous, can anyone think of a more novel approach?
>>
>>What I have is an array of values and timestamps:
>>
>>17 15:31
>>16 15:32
>>27 15:33
:)
Perfect! Thank you.
On Thu, Aug 2, 2012 at 1:25 PM, Robert Williams wrote:
> On 8/2/12 05:51, "Paul Halliday" wrote:
>
>
>>What I have is an array of values and timestamps:
>>
>>17 15:31
>>16 15:32
>>27 15:33
>>14 15:34
>>11
On Wed, Oct 24, 2012 at 2:40 PM, Samuel Lopes Grigolato
wrote:
> Could you try changing this:
>
> if($groupTest != FALSE) {
>
> to this:
>
> if($groupTest !== FALSE) {
>
> ?
Hah. Perfect! Thanks.
>
> -Mensagem original-
> De: Paul Halliday [mailto:p
ach time a
request is made.
Thanks.
--
Paul Halliday
http://www.pintumbler.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Dec 11, 2012 at 9:02 AM, Ashley Sheridan
wrote:
> **
> On Tue, 2012-12-11 at 08:46 -0400, Paul Halliday wrote:
>
> Hi,
>
> I have a form that has username and password fields. While the form
> exists and contains various other fields the most common mode of
> opera
On Tue, Dec 11, 2012 at 9:12 AM, Ashley Sheridan
wrote:
> **
> On Tue, 2012-12-11 at 08:58 -0400, Paul Halliday wrote:
>
> On Tue, Dec 11, 2012 at 9:02 AM, Ashley Sheridan
> wrote:
>
> On Tue, 2012-12-11 at 08:46 -0400, Paul Halliday wrote:
>
> Hi,
>
> I
What is the quickest way to do this? Will stats_stat_percentile work?
If so, does anyone have examples of its operation?
Keep in mind that my math is terrible. Use small words :)
Thanks.
--
Paul Halliday
http://www.pintumbler.org
--
PHP General Mailing List (http://www.php.net/)
To
On Sat, Jan 29, 2011 at 2:28 PM, Adam Richardson wrote:
> For the nearest rank computation, you could use the following:
>
> $arr =
> array(12,89,65,23,90,99,9,15,56,67,3,52,78,12,10,88,77,77,77,77,77,77,77);
> sort($arr);
> $score_representing_95th_percentile = $arr[round((95/100) * count($arr) -
I have 2 buttons on a page:
if (isset($_POST['botton1'])) {dothing1();}
if (isset($_POST['button2'])) {dothing2();}
They both work as intended when I click on them. If however I click
within a text box and hit enter, they both fire.
Is there a way to stop this?
Thanks.
--
I am not sure I am doing this right,
I have login.php which does:
$ua = $_SERVER['HTTP_USER_AGENT'];
$ua .= rand(0,4200);
$ua = md5($ua);
and upon successful auth, I push them to the main program:
header ("Location: squert.php?id=$ua");
at the beginning of squert.php I have:
if(!isset($_SESSI
$_REQUEST['id'])) { $id = 0; } else { $id = $_REQUEST['id'];}
// Kill the session if the ids dont match.
if ($id != $_SESSION['id']) {
sKill();
}
// Kill the session if timeout is exceeded.
if (isset($_SESSION['LAST_ACTIVITY']) && (time() -
$_SESS
I have a few scripts that use "../location/file"
Is this interpreted differently on some systems?
Thanks.
--
Paul Halliday
http://www.squertproject.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
They are through a vendor whom the recruiter probably pays to administer
> the test.
>
> Incidentally, despite having written an awful lot of working PHP code, I
> don't do well on those tests. Helps my confidence a lot, as you can
> imagine.
>
> Paul
>
Geez, closed boo
27;Y-m-d');
}
When I run it:
$ ./process_patches.php 201-01-01
Usage: ./process_patches.php
patches@innm2 ~/Code/Oculi $ ./process_patches.php 2011-011-01
Usage: ./process_patches.php
patches@innm2 ~/Code/Oculi $ ./process_patches.php 2011-01-011
Works..
What am I doing wrong?
On Fri, Oct 28, 2011 at 1:38 PM, Jim Long wrote:
> I'm running PHP 5.3.8 on FreeBSD 8.2 with MySQL 5.1.55.
>
> The script below is designed to be able to WHILE it's way through
> a MySQL query result set, and process each row.
>
> However, it runs out of memory a little after a quarter million
> r
On Fri, Oct 28, 2011 at 7:19 PM, Daniel Brown wrote:
> On Fri, Oct 28, 2011 at 18:13, Paul Halliday wrote:
>>
>> Whats the difference between fetch_assoc and fetch_row?
>>
>> I use:
>> while ($row = mysql_fetch_row($theQuery)) {
>> doCartwheel;
>&g
;hello world";
>> ?>
>>
>> Reply to list with a few more details for a more detailed reply ;)
>>
>>
>
--
Paul Halliday
http://www.squertproject.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
44 matches
Mail list logo