;#112;#45;#103;#101;#110;#101;#114;#97;#108;#64;#108;#105;#115;#116;#115;#46;#112;#104;#112;#46;#110;#101;#116;
On 2/27/07, John Taylor-Johnston
[EMAIL PROTECTED] wrote:
I need an anti-spam-spider measure for my site. Too many addresses are
getting raked. In once instance, I created a flash
I need an anti-spam-spider measure for my site. Too many addresses are
getting raked. In once instance, I created a flash page:
http://erasethis.glquebec.org/English/contact.htm
But I just don't have the time to create a flash image for every single
instance, most of which come from dynamically
it, you would use
preg_replace_callback('~([\d\w])~', create_function('$a', 'return
#.ord($a[0]).;;'), $theEmail);
Hopefully that works?
On 2/27/07, John Taylor-Johnston
[EMAIL PROTECTED] wrote:
How do I encode it? And would the href tag work?
Casey Chu wrote:
^ So put that into a a href tag
Can I PHP generate a flash *.swf? How?
If not how do I PHP generate a *.png or gif?
Jochem Maas wrote:
Stut wrote:
Of course the best way is to use an image and don't link it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$mydata-timestamp = 20070419162123;
echo date('Y-m-d', $mydata-timestamp);
result: 2038-01-18
?? What is wrong?? Should be 2007-04-19?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It is actually a generated timestamp in MySQL.
timestamp(14)
Now what? I was hoping to avoid:
|echo substr(|$mydata-timestamp|, 0, 8);
John
|Richard Lynch wrote:
On Sun, April 22, 2007 1:05 am, John Taylor-Johnston wrote:
$mydata-timestamp = 20070419162123;
echo date('Y-m-d', $mydata
I want to print [EMAIL PROTECTED] into a gif or png.
How do I do this?
Thanks. It seems too simple to ask.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Excellent. I was trying to figure out how to use colour from the example
in the manual.
This is easier.
Thanks!
John
Richard Lynch wrote:
On Mon, April 23, 2007 12:01 pm, John Taylor-Johnston wrote:
I want to print [EMAIL PROTECTED] into a gif or png.
How do I do this?
Thanks. It seems too
Good grief. It doesn't like printing an INT field like as if it were a
string??
I looked at: http://php.ca/manual-lookup.php?pattern=stringtoint like I
might of in Delphi :)p
echo td$mydata-2010/td\n;
echo td$mydata-2009/td\n;
Is this something new in PHP? Geez.
John
--
PHP
$content = ... a bunch of text with some !--protected--protected
information!--/protected-- with some more text with some more
!--protected--tabletrtdmore protected
text/td/tr/table!--/protected-- and even !--protected--bsome
protected contentb!--/protected--;
I want to replace any content
'
~viraj
On Thu, Jan 7, 2010 at 2:16 PM, John Taylor-Johnston
john.taylor-johns...@cegepsherbrooke.qc.ca wrote:
$content = ... a bunch of text with some!--protected--protected
information!--/protected-- with some more text with some more
!--protected--tabletrtdmore protected
text/td/tr/table
How do I parse a date field from mysql?
I was hoping this would work:
$mydata-birthday = 2007-02-13;
#What month is it?
echo date(F, $mydata-birthday);
#What year is it?
echo date(Y, $mydata-birthday);
What am I missing? All I get is December 1969. Hmmm?
I am looking at the manual:
, John Taylor-Johnston
john.taylor-johns...@cegepsherbrooke.qc.ca
mailto:john.taylor-johns...@cegepsherbrooke.qc.ca wrote:
How do I parse a date field from mysql?
I was hoping this would work:
$mydata-birthday = 2007-02-13;
#What month is it?
echo date(F, $mydata-birthday
Hello,
In a mysql date() field, I set the default to -00-00.
Therefore, $mydata-birthday = -00-00;
But when I run this next line, $then = 1969.
$then=date(Y, strtotime($mydata-birthday));
Why 1969, and not 0 or nothing?
If I echo strtotime(-00-00);
Nothing appears. So $then
My thanks to all!
Adam Richardson wrote:
I've not read this, but if the first valid date is Jan. 1st, 1970,
then passing that date back in the case of errors would lead to
ambiguity. Is it a valid date or is it an error. Passing back the
date of the day just before (in terms of time, I
Ok, I think this is a MySQl question. Take pity on me?
$sql = SELECT * FROM $db.`mailinglist` WHERE `type` IN ('Member',
'Affiliated', 'Life Member') ORDER BY `rollnumber` ASC;
rollnumber is a varchar(50). I need it to be a text field. ASC does not
order the way I want.
1000
1001
998
999
.
Cheers,
Rob.
John Taylor-Johnston wrote:
Ok, I think this is a MySQl question. Take pity on me?
$sql = SELECT * FROM $db.`mailinglist` WHERE `type` IN ('Member',
'Affiliated', 'Life Member') ORDER BY `rollnumber` ASC;
rollnumber is a varchar(50). I need it to be a text field. ASC does
not order
Did some googling. This worked:
ORDER BY CAST(`rollnumber` AS SIGNED)
What is the difference? My problem in the meanwhile must be my version
of MySQL?
John Taylor-Johnston wrote:
It hates me:
SELECT * FROM ... WHERE `type` IN ('Member', 'Affiliated', 'Life
Member') ORDER BY CAST(rollnumber
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
$mydata-restored = -00-00;
How do I express this? If the first four characters are , then do {}
What I am looking for is in strpos(), no?
if ()
{
}
--
PHP General Mailing List (http://www.php.net/)
To
$now=date(Y-m-d);
A = $mydata-birthday = 1928-02-12;
B = $mydata-birthday = 1965-03-18;
C = $mydata-birthday = 1976-04-11;
I'm doing a demographic sort.
How do I calculate whether $mydata-Birthday falls into these categories
below?
I'm working my way right now through the manual:
(d) - $day;
if ($day_diff 0 || $month_diff 0)
$year_diff--;
return $year_diff;
}
echo birthday ($birthday);
John Taylor-Johnston wrote:
I'm working my way right now through the manual:
http://ca.php.net/manual/en/function.strtotime.php.
--
PHP General Mailing List (http
Yaay, I'm 45 now :).
Here is another nifty piece of code I found. How does this work? What is
31556926?
function calculateAge($birthday){
return floor((time() - strtotime($birthday))/31556926);
}
echo calculateAge('1965-10-17');
http://ca.php.net/manual/en/function.floor.php
9970318527584
Could this number refer to a date()? In late 2009?
How could I calculate it?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm a teacher. I want to use PHP to interface with Google and see if a
student has plagiarized.
I don't see many open-source projects on the subject, so I want to
create my own script.
How can I use PHP to interface with Google and see if this text exists
on the internet?
If this is
intuitive.)
Thanks Ash.
John
Ashley Sheridan wrote:
On Wed, 2012-02-15 at 21:56 -0500, John Taylor-Johnston wrote:
How can I use PHP to interface with Google and see if this text exists
on the internet?
Wow, that's a pretty big project you're chewing there. A quick search
shows
I'm a top quoter.
I would parse the text first. Phrase by phrase, or phrase segments.
Then spit out a report.
Marc Guay wrote:
If that's not good enough, can you explain how you would like it to
function? Would the whole paper be scanned phrase-by-phrase for
matches and then spit out a report?
I want to parse this text and count the occurrence of each word:
$text =
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.html; #Can I
do this?
$stripping = strip_tags($text); #get rid of html
$stripping = strtolower($stripping); #put in lowercase
First of all I
This is usually a first-year CS programming problem (word frequency
counts) complicated a little bit by needing to extract the text.
You've started off fine, stripping tags, converting to lower case,
you'll want to either convert or strip HTML entities as well, deciding
what you want to do
See:
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps
In $mystring, I need to extract everything between |News Releases| and
-30.
The thing now is $mystring might contain many instances of
|News Releases| and
On Sun, Sep 2, 2012 at 6:23 AM, John Taylor-Johnston
jt.johns...@usherbrooke.ca wrote:
See:
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps
In $mystring, I need to extract everything between |News Releases
Frank Arensmeier wrote:
See:
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps
In $mystring, I need to extract everything between |News
Releases| and
-30.
My approach would be to split the hole text into
See:
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps
In $mystring, I need to extract everything between |News Releases| and
-30.
The thing now is $mystring might contain many instances of |News
Releases|
and -30.
How can I clean this up?
My approach would be to split the hole text into smaller chunks (with
e.g. explode()) and extract the interesting parts with a regular
expression. Maybe this will give you some ideas:
$chunks = explode(-30-, $mystring);
foreach($chunks as $chunk) {
tamouse mailing lists wrote:
Just to prove me right, our mail clients start quoting from the top too :)p
tamouse mailing lists wrote:
On Sun, Sep 2, 2012 at 11:31 AM, John Taylor-Johnston
jt.johns...@usherbrooke.ca wrote:
I'll never get it. Newest work on top of the pile, instead of digging
tamouse mailing lists wrote:
On Sun, Sep 2, 2012 at 7:57 PM, John Taylor-Johnston
jt.johns...@usherbrooke.ca wrote:
Just to prove me right, our mail clients start quoting from the top too :)p
Exactly. The quoting starts from the *top*. The problem is that the
cursor to start typing is also put
Frank Arensmeier wrote:
2 sep 2012 kl. 19.48 skrev John Taylor-Johnston:
Why not add two lines of code within the first loop?
$chunks = explode(-30-, $mystring);
foreach($chunks as $chunk) {
preg_match_all(/News Releases\n(.+)/s, $chunk, $matches);
foreach($matches[1
I have a big giant RTF file. I could convert it to plain text. BUT can
PHP do it for me?
Also:
I want to read the text file into a string. This does the job well, right?
http://php.net/manual/en/function.file-get-contents.php
This is it? Not more complicated?
|?php
$homepage =
Hi,
?php
...
$words = preg_split('/[[:space:]]+/',$mynewstring);
foreach ($words as $word) {
$freq[$word]++;
}
ksort($freq);
print_r ($freq);
?
If I have my terminology right, ksort($freq) sorts the array by the key.
And that works fine.
But I would also like to sort by value to see
?php
...
$words = preg_split('/[[:space:]]+/',$mynewstring);
foreach ($words as $word) {
$freq[$word]++;
}
ksort($freq);
print_r ($freq);
?
ksort($freq) sorts the array by the key. And that works fine.
But I would also like to sort by value to see which words are more frequent.
There is
?php
...
$words = preg_split('/[[:space:]]+/',$mynewstring);
foreach ($words as $word) {
$freq[$word]++;
}
ksort($freq);
print_r ($freq);
?
ksort($freq) sorts the array by the key. And that works fine.
But I would also like to sort by value to see which words are more frequent.
There is
Serge Fonville wrote:
Have you looked at http://php.net/manual/en/array.sorting.php?
2012/9/3 John Taylor-Johnston jt.johns...@usherbrooke.ca
mailto:jt.johns...@usherbrooke.ca
?php
...
$words = preg_split('/[[:space:]]+/',$mynewstring
?php
...
$words = preg_split('/[[:space:]]+/',$mynewstring);
foreach ($words as $word) {
$freq[$word]++;
}
ksort($freq);
print_r ($freq);
?
Sort does not work seamlessly. I have my key
groet,
Serge Fonville
http://www.sergefonville.nl
Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table
2012/9/3 John Taylor-Johnston jt.johns...@usherbrooke.ca
Hi,
Sorting question. http://www.php.net/manual/en/array.sorting.php
I'm using ksort, which sorts like this.
I don't want to use strolower.
Is there a function/switch in one of the sort functions where I could
get another aphabetical sort?
http://www.php.net/manual/en/array.sorting.php has a
The problem is I'm sorting the key. The alphabetical thing is in the key.
David OBrien wrote:
On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston
jt.johns...@usherbrooke.ca mailto:jt.johns...@usherbrooke.ca wrote:
Hi,
Sorting question. http://www.php.net/manual/en
David OBrien wrote:
On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston
jt.johns...@usherbrooke.ca mailto:jt.johns...@usherbrooke.ca wrote:
Hi,
Sorting question. http://www.php.net/manual/en/array.sorting.php
I'm using ksort, which sorts like this.
I don't want to use
Matijn Woudt wrote:
Taken from the natsort manual page comments:
?php
/**
* keyNatSort does a natural sort via key on the supplied array.
*
* @param $array The array to natural sort via key.
* @param $saveMemory If true will delete values from the original
array as it builds the
Without anyone infecting their machines, can someone tell me what this
is? I found a phishing site on my DreamHost server. DreamHost has been
very helpful.
We found a file containing this code.
What is it? What does it contain?
?php
to be*
http://web-hosting-click.com/; title=Web hostingWeb hosting/a
!-- 27 queries. 0.561 seconds. --
/div
?php wp_footer(); ?
/body
/html ?
Appears that is nothing dangerous, only unauthorized advertising.
Em 02-10-2012 14:27, John Taylor-Johnston escreveu:
Without anyone infecting their machines
I am capable with select name=DPRpriority. (I suppose I did it
correctly? :p )
But I haven't the first clue how to parse a select multiple and
multiply select name=DPRtype.
Would anyone give me a couple of clues please? :)
Thanks,
John
Priority:
select name=DPRpriority
select multiple=multiple name=DPRtype form=DPRform
option value=1. Crimes Against Persons1. Crimes Against
Persons/option
option value=2. Disturbances2. Disturbances/option
option value=3. Assistance / Medical3. Assistance /
Medical/option
tamouse mailing lists wrote:
I hate arrays. :D
Here's a small snippet showing how it works, I hope:
foreach ($DPRpriority as $item = $value) {
echo li .$item.: .$value['name']. selected:
.$value['selected']. /li\n;
}
Question 1: when did we have to add [] to a input name to turn it into
I cannot find button2 in phpinfo() when I click it. I was hoping to find
a $_POST[button2] value.
What am I doing wrong?
input type=button name=button2 id=button2 value=Print Mode
onclick=formSubmit()
I really wanted to use a button to pass a different condition than a
input type=submit
What is the difference between?
if (empty... http://www.php.net/manual/en/function.empty.php Determine
whether a variable is empty
and
if (isset... http://php.net/manual/en/function.isset.php Determine if a
variable is set and is not *|NULL|*
I have an input type=radio value=something.
If
Hi,
I have a textarea when submitted creates a new form with the textarea
data in a hidden field:
input name=DPRnarration type=text hidden form=DPRform value=Enter call
narration here.
But when this new form gets resubmitted, the \n get stripped?
input name=DPRnarration type=text hidden
Design in Motion Webdesign wrote:
John Taylor-Johnston john.taylor-johns...@cegepsherbrooke.qc.ca wrote:
I cannot find button2 in phpinfo() when I click it. I was hoping to
find
a $_POST[button2] value.
What am I doing wrong?
input type=button name=button2 id=button2 value=Print Mode
I have many different submit button.
input value=Update type=submit
input name=DPRmode value=Enter Data type=submit
When php processes value=Enter Data, I would like to open a new
window, but only if I click this one.
Possible? I knw ther is an HTML target= thingy. Can PHP do anything magic?
You could echo HTML code e.g.
Which is still purely HTML and has nothing whatsoever to do with PHP.
form action=result.php method=post
Number: input id=quantity type=text /
button type=button onclick=OpenWindow()Submit/button
/form
or include it as one of
If you want to open a new page in response to a submit button press
(using PHP) you may be out of luck. I don't know of a way to do it
without involving another language. Opening a different page in the
*same* window, yes. Otherwise, no. But watch the other replies. Maybe
someone knows
I have a form
form action=CRTP_Query.php id=CRTP_Query method=post
target=_CRTPinput value=Query form=CRTP_Query type=submit/form
OnSubmit, I want to include data from another form (form=DPRform).
input name=DPRsurname type=text form=DPRform size=20
value=?php echo
Scratch that, IE does not like form elements outside the /form!!?? :,(
I can't a form within a form either, unless ... I float a div??.
John Taylor-Johnston wrote:
I have a form
form action=CRTP_Query.php id=CRTP_Query method=post
target=_CRTPinput value=Query form=CRTP_Query
type=submit
I'm using
if($mydata-DPRresponselocationaddress1 != )
is this the same as
if (!isset($mydata-DPRresponselocationaddress))
http://php.net/manual/en/function.isset.php
or
if (!empty($mydata-DPRresponselocationaddress))
http://php.net/manual/en/function.empty.php
or is there another function I
501 - 562 of 562 matches
Mail list logo