[PHP] Replacing text with criteria

2006-06-15 Thread Jeff Lewis
I have been working on a script to parse a CSV file and in the process I
clean out a lot of the garbage not needed but I am a bit stumped on one
aspect of this file. It's a list of over 3000 contacts and I'm trying to
mask a lot of the information with *.
 
So as I loop through this list I am checking the array elements as if I find
a phone number (555) 555-1212 (I was searching for the (555)) I want to
convert it to (555) ***-
 
For fields not containing an area code, I wanted any text to be replaced by
an * except for the first and last letter in the element.
 
I'm stumped and was hoping that this may be something horribly simple I'm
overlooking that someone can point out for me.


[PHP] Adding X days to a time string...

2003-11-21 Thread Jeff Lewis
Storing a date in seconds (Unix timestamp) in a database and want to add
X number of days to this. So I want to extend a time by say 5 days, what
is the best method to handle this?
 
It's always stored as a timestamp for a day not an exact time. So dates
are stored as day (March 5th, 2003).
 
Jeff


RE: [PHP] Adding X days to a time string...

2003-11-21 Thread Jeff Lewis
Sorry, I may have muddled that...the issue isn't converting a string to
a time, it's taking a time (102636 for example) and adding 30 days
to that.

Jeff

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 21, 2003 11:13 AM
To: [EMAIL PROTECTED]; php-gen
Subject: RE: [PHP] Adding X days to a time string...


[snip]
Storing a date in seconds (Unix timestamp) in a database and want to add
X number of days to this. So I want to extend a time by say 5 days, what
is the best method to handle this?
 
It's always stored as a timestamp for a day not an exact time. So dates
are stored as day (March 5th, 2003). [/snip]

http://www.php.net/strtotime

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using PHP to get size of mySQL data?

2003-08-22 Thread Jeff Lewis
I want to query a table of text articles and when selecting them I am
wondering if I can grab the actual size of the articles in question.
 
So if someone has two articles, I want to see if they have reache 100kb
in total.
 
Does that make sense to anyone? is that possible with PHP?
 
Jeff 


[PHP] Configuring PHP to use aspell

2003-08-14 Thread Jeff Lewis
I have the following set up...

RH Linux version 7.3

PHP 4.3.2

Aspell installed on the server

I have NEVER configured PHP and am looking for some assistance in
configuring PHP to use Aspell so I can take advantage of this great
feature that (as I can see from my searches) is not as well documented.

I'm not sure of the path to my Aspell either...

Jeff



[PHP] HTML mail being sent with mail() not working for some people

2003-03-27 Thread Jeff Lewis
We're sending out emails using mail() and sending it in HTML format and
while most people get it correctly a couple are not. They get the anti-abuse
headers and then the HTML code appears as just that - HTML code in the body
of the email.

Sending those same people an HTML email composed in Outlook comes across
just fine, perhaps it's the anti abuse headers causing the issue?

Has anyone heard or had experience with this?

Jeff





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTML mail being sent with mail() not working for some people

2003-03-27 Thread Jeff Lewis
A bit more information on this...here is the code being used:

$headers  = MIME-Version: 1.0\r\n;
$headers .= Content-type: text/html; charset=iso-8859-1\r\n;

/* additional headers */
$headers .= From: Jeff [EMAIL PROTECTED]\r\n;

$message = test;
 mail ('[EMAIL PROTECTED]', 'Quote of the Week from Jeff', $message,
$headers);

And again, it works for most people but two people have complained about
this issue. At least one as using MS Outlook.

Jeff


- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 12:14 PM
Subject: [PHP] HTML mail being sent with mail() not working for some people


 We're sending out emails using mail() and sending it in HTML format and
 while most people get it correctly a couple are not. They get the
anti-abuse
 headers and then the HTML code appears as just that - HTML code in the
body
 of the email.

 Sending those same people an HTML email composed in Outlook comes across
 just fine, perhaps it's the anti abuse headers causing the issue?

 Has anyone heard or had experience with this?

 Jeff





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Selecting date range from database

2003-03-26 Thread Jeff Lewis
I am trying to select a date range in this format from a database 1-Mar-03
to 26-Mar-03. The date is stored in a mySQL database in that format and when
doing a normal select it just selects the dates as if they are numbers.

How can I make this select work the way I want it to work? I am using the
following query:

SELECT * FROM members WHERE member_date = '01-Mar-03' AND member_date =
'26-Mar-03'  ORDER BY member_date;

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Hidden new line markers?

2003-03-24 Thread Jeff Lewis
I am using a SELECT statement to grab all items from a database table and while 
looping through the results I am connecting the fields with tabs and adding a new line 
at the end of the row to create a tab delimited file. 

On one field I do a nl2br in order to preserve the spacing in the field. However, when 
I import it into Excel, it keeps treating the br / as a nl. Am I missing something? 
I tried removing \r and \n with str_replace and I have used trim but it still doesn't 
work how I'm expecting it to.

Does anyone have any ideas on this?

Jeff


Re: [PHP] Hidden new line markers?

2003-03-24 Thread Jeff Lewis
The data is being entered into a textarea and is being stored as it is
entered but with an addslashes right before insertion.

On the extract I am doing the following:

$row[description] = stripslashes($row[description]);
$row[description] = nl2br($row[description]);
$row[description] = trim($row[description]);

I was trying str_replace as follows but that wasn't working:

$row[description] = str_replace(\n, , $row[description]);

Also, I had them in one larger statement as opposed to three lines but when
it wasn't working I broke it up to three individual lines to see if I could
narrow it down to what was causing the issue.

Jeff
- Original Message -
From: CPT John W. Holmes [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:03 PM
Subject: Re: [PHP] Hidden new line markers?


 nl2br() doesn't remove the newlines, it simply adds in the br / in
before
 them.

 The str_replace should work, how are you trying to use it?

 ---John Holmes...

 - Original Message -
 From: Jeff Lewis [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 2:56 PM
 Subject: [PHP] Hidden new line markers?


 I am using a SELECT statement to grab all items from a database table and
 while looping through the results I am connecting the fields with tabs and
 adding a new line at the end of the row to create a tab delimited file.

 On one field I do a nl2br in order to preserve the spacing in the field.
 However, when I import it into Excel, it keeps treating the br / as a
nl.
 Am I missing something? I tried removing \r and \n with str_replace and I
 have used trim but it still doesn't work how I'm expecting it to.

 Does anyone have any ideas on this?

 Jeff





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hidden new line markers?

2003-03-24 Thread Jeff Lewis
Ah! That did it, it's all on Windows and when I tried removing things I
tried at one point removing the \r as i thought the nl2br changed the \n to
br /

Thanks a lot John :)

Jeff

- Original Message -
From: CPT John W. Holmes [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:36 PM
Subject: Re: [PHP] Hidden new line markers?


  The data is being entered into a textarea and is being stored as it is
  entered but with an addslashes right before insertion.
 
  On the extract I am doing the following:
 
  $row[description] = stripslashes($row[description]);

 You don't have to use stripslashes() on data coming out of a database
unless
 you have magic_quotes_runtime enabled. If you find that you do need to
call
 it, then you're running addslashes() twice before the data is inserted.

  $row[description] = nl2br($row[description]);
  $row[description] = trim($row[description]);
 
  I was trying str_replace as follows but that wasn't working:
 
  $row[description] = str_replace(\n, , $row[description]);

 This will get rid of the \n, but leave the \r there. On windows, you'll
 still see a newline even with just the \r remaining. If you know
everything
 is coming from Windows, replace \r\n with an empty string. Unix uses just
a
 plain \n and Macs use just \r, while Windows uses \r\n. Adjust your
 str_replace accordingly if you need to account for data from all three
 possible OS.

 ---John Holmes...





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Parsing help needed, regular expression perhaps?

2003-03-12 Thread Jeff Lewis
I am grabbing this page and trying to grab the stats on the page: 
http://slam.canoe.ca/StatsHKN/BC-HKN-STAT-TORONTOSTAX-R.html

The code I had worked just fine before but now that there are players that have 
multiple lines, it's not working as I'd like it to. Below is the code that worked and 
I need help to get it to ignore the lines of players from other teams and just get 
thheir total number.

$statsURL = http://slam.canoe.ca/StatsHKN/BC-HKN-STAT-TORONTOSTAX-R.html;;
$season = 2002-03R;
 
$urlHandle = fopen($statsURL, r);
 if (!$urlHandle) {
  echo $errstr ($errno)br\n;
  exit;
 }
 $rawHtml = fread($urlHandle,100);
 fclose($urlHandle);
 $rawHtml = stristr($rawHtml, pre);
 
$stats = substr($rawHtml, 0, strpos($rawHtml, /pre)-1);
 $playerline = preg_split(/\n/, $stats, -1, PREG_SPLIT_NO_EMPTY);
 $count = count($playerline);

 echo Players: $countP;
 for ($x = 0; $x = $count; $x++)  {
  $playerstats = preg_split(/[ ]/, $playerline[$x], -1, PREG_SPLIT_NO_EMPTY);
  }


[PHP] Debugging fsockopen errno 0?

2003-03-04 Thread Jeff Lewis
I've been trying to use fsockopen and it fails to get by if (!fp) and returns an errno 
of 0.

In the documentation it says that indicates an error initializing the socket. Is there 
anyway I can debug this or find out what is going wrong?

Jeff


[PHP] PHP scripts and the GPL/other licenses

2003-03-01 Thread Jeff Lewis
I am wondering if anyone out there has some really good references in
regards to scripts distributed as open source using the GPL. In the last
three years that I have worked on open source projects I have seen several
people steal a program, change the name and then try to distribute it as
something else.

So I am wondering what people here prefer to use for a license, is there
anyway to combat these kinds of people, etc.

Why do I ask now? Because it has happened again, only this time, the person
is actively marketing this new script.

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP scripts and the GPL/other licenses

2003-03-01 Thread Jeff Lewis
And they aren't, that is our main issue...

So with the GPL, someone can change say...10 lines and rename the scripts
and distribute it as their own?

Jeff
- Original Message -
From: Leif K-Brooks [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, March 01, 2003 11:33 PM
Subject: Re: [PHP] PHP scripts and the GPL/other licenses


 They're doing nothing wrong as long as they distribute the source under
 the GPL.

 Jeff Lewis wrote:

 I am wondering if anyone out there has some really good references in
 regards to scripts distributed as open source using the GPL. In the last
 three years that I have worked on open source projects I have seen
several
 people steal a program, change the name and then try to distribute it
as
 something else.
 
 So I am wondering what people here prefer to use for a license, is there
 anyway to combat these kinds of people, etc.
 
 Why do I ask now? Because it has happened again, only this time, the
person
 is actively marketing this new script.
 
 Jeff
 
 
 
 
 

 --
 The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SMS messages and the From field...

2003-02-22 Thread Jeff Lewis
I have been using mail() to send SMS messages to my phone but the From
address never seems to work as I set it. When it arrives in my email client
it works fine but when it gets to my phone it does. I have set headers like
so:

From: $from_email\r\nReply-To: $from_email\r\nReturn-path: $from_email

I have also tried to set this before and then after the mail() call:

ini_set(sendmail_from, $from_email);
ini_restore(sendmail_from);

Has anyone experienced this same thing? If so, did you manage to get it
fixed?

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MAC address user recognition?

2003-02-21 Thread Jeff Lewis
So how are most people handling the situation you mentioned below? After
getting verfified in a https, how is the session information being passed
back to the http?

Jeff
- Original Message -
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: Jason Sheets [EMAIL PROTECTED]
Cc: Leo Spalteholz [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 3:40 AM
Subject: Re: [PHP] MAC address user recognition?


 If you were concerned about the overhead of SSL you could make only your
 login page go over SSL and the rest of your site go over normal HTTP.

 You can do this, but you cannot to pass the session token via cookie,
since
 https://yourdomain.com
 and
 http://yourdomain.com
 are seen as different hosts, thus a cookie (default setting) will not be
 shared among these.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Windows PHP vs Linux PHP

2003-01-15 Thread Jeff Lewis
Set your php.ini file and error reporting as such:

error_reporting  =  E_ALL  ~E_NOTICE

See if that helps with the undefined notice.

jeff
- Original Message -
From: Beauford.2002 [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 12:52 PM
Subject: [PHP] Windows PHP vs Linux PHP


 Hi,

 I asked previously about the differences between the two and the concensus
 was any differences are in the operating systems themselves and not with
 PHP. Knowing this, how do I get rid of these errors that keep coming up in
 Windows, that don't in Linux. One specific one is  Notice: Undefined
 variable: add in E:\IIS Webs\address.php on line 3

 Someone said to turn on register_globals which I have. Another suggestion
 was to put a @ sign in from of all variables. This is a real pain. Anyone
 have any other suggestions, or is this basically it?

 Also, is there anything else that anyone can think of that I may have to
 look forward to using PHP under Windows?

 TIA




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Suggestions on FAQ application?

2003-01-10 Thread Jeff Lewis
I've checked Hotscripts and I can't findanything relatively new or that suits my 
needs. I was wondering if anyone uses a FAQ program that they could suggest?

Jeff



Re: [PHP] Suggestions on FAQ application?

2003-01-10 Thread Jeff Lewis
Why re-invent what is already written? I'm well aware that it's easy to
write but there may be something out there already that suits my needs and
has some features that I hadn't thought of. If you don't have a suggestion
on a package please spare me the rude replies which seem to run rampant on
here lately...

Jeff
- Original Message -
From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
To: 'Jeff Lewis' [EMAIL PROTECTED]; 'php-gen' [EMAIL PROTECTED]
Sent: Friday, January 10, 2003 9:39 PM
Subject: RE: [PHP] Suggestions on FAQ application?


 It is a 30 minute write... not that hard!!


 Timothy Hitchens (HiTCHO)
 Open Platform Consulting
 e-mail: [EMAIL PROTECTED]

  -Original Message-
  From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, 11 January 2003 12:37 PM
  To: php-gen
  Subject: [PHP] Suggestions on FAQ application?
 
 
  I've checked Hotscripts and I can't findanything relatively
  new or that suits my needs. I was wondering if anyone uses a
  FAQ program that they could suggest?
 
  Jeff
 







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Looping through directories?

2003-01-08 Thread Jeff Lewis
Currently I have a script that reads an index file and from that index file it then 
loops through all files in that directory based on the index.

Instead of one directory now I have several and I want to loop through each directory 
and go to each directory's index file. Since there is no pattern for the name if the 
indexes, I assume I need to create an array holding the directory name and the 
associated index file name like so $dirs = array(Sports = spindex.xml, Business 
News = business.xml) etc

Now, I need help with the loop to whip through each directory. Would I do a foreach on 
the array I just created? Any help would be greatly appreciated. I need to be able to 
access both the directory name and index name.

Jeff



[PHP] Function to catch all mySQL errors?

2003-01-04 Thread Jeff Lewis
I know that mySQL errors are caught in mysql_error() and I find that
function extremely useful (kudos!). However, I have several queries in a few
scripts of mine but am wondering if anyone has written a small function that
catches errors and outputs them. What I mean is lets say I have a block of
code like so:

$result = mysql_query(SELECT field1, field2 FROM users WHERE userLogin =
'$authusername' AND userPassword = '$authpassword');

Instead of a small loop under my query that is like so:

if (mysql_error()) {
 echo Error: .mysql_error();
 exit;
}

I'd like to be able to call a function that does this instead of adding this
if statement after all my queries...so...anyone do something similar?

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Bit of a logical question (what values to use for a graph)

2003-01-03 Thread Jeff Lewis
I am creating a graph using jpgraph and it is based on values grabbed every
15 minutes. So for the first graph I want to report the values for the last
24 hours. Would it make sense to report 96 points or what is everyones
suggestion?

The time is stored as a Unix timestamp...the values are server loads.

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Problems getting PHP to work (IIS5/XP Pro)

2002-12-31 Thread Jeff Lewis
Now I tried this on the Windows list but didn't get any replies. I also found an old 
thread on another site that Rasmus had replied to and I tried that suggestion but no 
luck.

I just ran the PHP installer and it set it up as a cgi I guess. I'd do the other way 
if I could find complete instructions. I tried the ones in the file included with the 
zip but it gave another error.

I don't understand why I'm having issues, I installed PHP 4.1 and below just fine in 
this very same set up.

However, I am receiving the following error:

 No input file specified. 

I have tried some of the suggested methods of fixing this but have not been able to 
solve it. Does anyone have a link or some info on how to fix this?

Jeff





Re: [PHP] forum?

2002-12-24 Thread Jeff Lewis
http://www.yabbse.org


- Original Message -
From: Fatih Üstündað [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Tuesday, December 24, 2002 9:51 AM
Subject: [PHP] forum?


 do you know freeware forum in php I can easly use?

 thanks.
 fatih ustundag

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[PHP] Parsing XML files, logic involved...

2002-11-27 Thread Jeff Lewis
I have to write a script to parse XML files we receive daily. The XML files are all 
individual stories but there is an index page that comes with each batch that contains 
blocks of information for each story as follows (below). I need to run through this 
index file and for each story I need to grab the NewsItemID, the Time, and then the 
SourceFilePath.

From there I need to then open up the individual stories and do some formatting but 
for now I need to get by this :) I was planning on line by line through the file but 
am not sure how I would go about grabbing the information I require. Sometimes there 
is a SourceFilepath but sometimes its missing.

Any help would be greatly appreciated.

ContentItem

Comment NewsItemID=780023,   Time=28-05-02 13:43/
Comment SlugLine=Canada-U.S.-Protectionism/

DataContent
CPOnlineFile Type=IndexStoryItem
JavaScript ScriptLanguage=JavaScriptLanguage;CPJavaScriptOpenWindow;/JavaScript
CPIndexStoryHeadChretien pushes Bush on softwood, agriculture, but gets no 
promises/CPIndexStoryHead
CPStory
CPStoryPara Number=1 ParaSpace=FALSE
(CP) - Prime Minister Jean Chretien said he pressed U.S. President George W. Bush on 
Tuesday to address festering trade disputes between the two countries, but got no 
assurances that disagreements over softwood lumber or agricultural subsidies would be 
resolved. Chretien, who raised the matters after a NATO meeting in the Italian 
capital, said he was very forceful with Bush. But he said the president blamed 
Congress for the logjam.

/CPStoryPara
CPStoryPara Number=2 ParaSpace=FALSE
It's always like that when you deal with the president of the United States: 'Yes, 
but the Congress and the Senate . . . ' In Canada you blame the prime minister or you 
congratulate the prime minister because he cannot pass the buck to anyone else.

/CPStoryPara
/CPStory
CPLink Type=StoryFile Number=1 SourceFilePath=./n052814A.xml/

/CPOnlineFile
/DataContent
/ContentItem



Re: [PHP] Best Forum System

2002-10-12 Thread Jeff Lewis

YaBB SE seems to do quite well, I have it running on three sites.

http://www.yabb.info

Jeff
- Original Message -
From: Stephen [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 5:36 PM
Subject: [PHP] Best Forum System


Hello,

I know there will be a load of different responses but I'm after the most
frequent one. What exactly is the best forum system out there? I'm mainly
after a PHP one but a Perl or CGI one will do just fine. Thanks!

Thanks,
Stephen Craton
http://www.melchior.us
http://php.melchior.us



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Verify phone format?

2002-09-10 Thread Jeff Lewis

Just wondering what the best way to validate an entered phone format is? Is
anyone doing this currently?

I have a form field that people enter in information and I want to force
phone entries to XXX-XXX-.

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Verify phone format?

2002-09-10 Thread Jeff Lewis

If it makes you feel better, it's a site only for Canada.

Jeff
- Original Message -
From: Justin French [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 7:35 PM
Subject: Re: [PHP] Verify phone format?


 The problem you have is that not all phone numbers share that format...
mine
 for example (Australia) is 61 3   (that is, CountryCode, State,
 Exchange, Number).  So it depends on who will fill out your form... if
 you're talking international, you may want to think twice.

 It never ceases to frustrate me when global sites (usually based in the US
 I've found) tend to think that their way is the only way.  Countless
times
 where the the number format of phone numbers wouldn't let me enter my
number
 correctly, or the state abbreviation was only 2 chars (Australia is 3, eg
 VIC), only allowing me to select a US state (no other option) -- but
still
 allowing me to select Australia from the country list, etc etc.

 The best way to make people conform is to break the number into multiple
 boxes, for country code, area code, and number.

 You can then join them with a -, and even do some small manipulations on
the
 last one (eg putting a - after 4 chars, or whatever), check they're all
 filled out, and then insert the completed, correctly formatted number into
 the database :)


 Cheers,
 Justin

 PS there might be a class to validate to a correct international number
 format, which MAY give you what you want.



 on 11/09/02 1:30 AM, Jeff Lewis ([EMAIL PROTECTED]) wrote:

  Just wondering what the best way to validate an entered phone format is?
Is
  anyone doing this currently?
 
  I have a form field that people enter in information and I want to force
  phone entries to XXX-XXX-.
 
  Jeff
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Credit Card Validation

2002-09-07 Thread Jeff Lewis

I know it's been posted here several times and I've looked through the archives but I 
just need something very simple for this. I have a form that already takes in user 
information but now before accepting the information, I'd like to pass the credit card 
information to a function and return true or false.

Is anyone using something like this that is simple?

Jeff



[PHP] Regular expression question

2002-08-30 Thread Jeff Lewis

Is there a regular expression that will remove 1, L, I, O, 0 and the
lowercase equivilants from a varialbe?

I am not horribly well versed in regular expressions...so I'm basically
asking someone to help :)

Say I have a string like this jeD1GLal

I want to remove any of the chracters that be confusing ...

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Jeff Lewis

Trim clears whitespace not characters (I'm pretty sure), try using this to
rid yourself of the period:

$trimmed = substr($date, 0, -1);  // returns everything but that last
character (the period)

Jeff
- Original Message -
From: Mike At Spy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 12:35 PM
Subject: [PHP] Agh! trim (#$@#@^%!!!)



 Hey!

 :)

 I have an issue with trim / triml.  Whenever I put a string in to trimmed,
 it refuses to take the period at the end of the string off.

 I did put more things to trim first, but this is basically what I am
doing:


 $single = The date is 20-Aug-2002. // This is an example - see below
 $trimmed = rtrim($date, .);


 Is there an issue with this?  I've tried using trim() too.

 The source of $single is a reponse from a server.  I should note that when
I
 put this in as an experiment, it works fine.  When I get the line from the
 server, it doesn't work!

 The only thing I can think of is the possibility that the . I am seeing
at
 the end of the line isn't really one (it looks like a duck, copies like a
 duck, but...isn't a duck??!!).

 Is there a way to just strip the last character off regardless of what it
 is?

 Thanks,

 -Mike



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Jeff Lewis

Sorry, just saw Rasmus' reply, lso I didn't read your code entirely, noticed
you specified for the period to be chopped off :)

Jeff
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: Mike At Spy [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 12:53 PM
Subject: Re: [PHP] Agh! trim (#$@#@^%!!!)


 Trim clears whitespace not characters (I'm pretty sure), try using this to
 rid yourself of the period:

 $trimmed = substr($date, 0, -1);  // returns everything but that last
 character (the period)

 Jeff
 - Original Message -
 From: Mike At Spy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, August 20, 2002 12:35 PM
 Subject: [PHP] Agh! trim (#$@#@^%!!!)


 
  Hey!
 
  :)
 
  I have an issue with trim / triml.  Whenever I put a string in to
trimmed,
  it refuses to take the period at the end of the string off.
 
  I did put more things to trim first, but this is basically what I am
 doing:
 
 
  $single = The date is 20-Aug-2002. // This is an example - see below
  $trimmed = rtrim($date, .);
 
 
  Is there an issue with this?  I've tried using trim() too.
 
  The source of $single is a reponse from a server.  I should note that
when
 I
  put this in as an experiment, it works fine.  When I get the line from
the
  server, it doesn't work!
 
  The only thing I can think of is the possibility that the . I am
seeing
 at
  the end of the line isn't really one (it looks like a duck, copies like
a
  duck, but...isn't a duck??!!).
 
  Is there a way to just strip the last character off regardless of what
it
  is?
 
  Thanks,
 
  -Mike
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Problem with mysql_query

2002-08-20 Thread Jeff Lewis

mysql_query is returning an odd error. I don't know if I'm just totally missing 
something or not but I keep getting this error:

mySQL Error: You have an error in your SQL syntax near ''LIMIT 25,25'' at line 1 

with this query:

SELECT * FROM dvd_library WHERE genre=BUDGET ORDER BY description ASC LIMIT 25,25

Does anyone else notice what the error is?



Re: [PHP] Problem with mysql_query

2002-08-20 Thread Jeff Lewis

Please disregard, it was a silly problem (I was echoing the SQL query and
editing that, not the main SQL query).

Jeff
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 3:04 PM
Subject: [PHP] Problem with mysql_query


mysql_query is returning an odd error. I don't know if I'm just totally
missing something or not but I keep getting this error:

mySQL Error: You have an error in your SQL syntax near ''LIMIT 25,25'' at
line 1

with this query:

SELECT * FROM dvd_library WHERE genre=BUDGET ORDER BY description ASC LIMIT
25,25

Does anyone else notice what the error is?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Group and count at the same time?

2002-08-15 Thread Jeff Lewis

I am using PHP to maintain a catalog of music and have been just fine with
it but have run into one thing i want to do and need some advice.

The format of the data is like so:

upc|genre|distributor|details

What I want to do is grab a summary. So it would end up printing out:

rock (43)
country (41)

and so on. Is this possible to do with one query or will I need to do it
with more? So I want to count the number of each genre and provide a count
for each.

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Group and count at the same time?

2002-08-15 Thread Jeff Lewis

Jason,

Much appreciated, this worked :)

select genre, count('genre') from catalog group by genre
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 15, 2002 11:26 AM
Subject: Re: [PHP] Group and count at the same time?


 On Thursday 15 August 2002 23:19, Jeff Lewis wrote:
  I am using PHP to maintain a catalog of music and have been just fine
with
  it but have run into one thing i want to do and need some advice.
 
  The format of the data is like so:
 
  upc|genre|distributor|details

 Where is this info coming from?

  What I want to do is grab a summary. So it would end up printing out:
 
  rock (43)
  country (41)
 
  and so on. Is this possible to do with one query or will I need to do it
  with more? So I want to count the number of each genre and provide a
count
  for each.

 If it's from a database then you really should be asking on the php-db
list.

 Something like:

   select genre, count('genre') from catalog group by genre

 should work.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] News to toolbar (ticker)

2002-08-01 Thread Jeff Lewis

vBulletin has a file called ticker.php that allows users to have latest
posts sent to their toolbar in Windows. An example can be found on this
site: http://www.whitesoxinteractive.com/Ticker.htm

How exactly do they do this? I can't manage to get my hands on the file to
take a look but it's something I'd like to look at.

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHPDiscuss.com

2002-07-13 Thread Jeff Lewis

I think there is always a need for more resources. Some people prefer forums
and the ability to actually go a bit off topic in some boards as opposed to
strictly answering questions. It's a matter of preference I suppose.

Anything that further helps PHP spread I'm for it :)

Jeff
- Original Message -
From: Justin French [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 13, 2002 10:05 PM
Subject: Re: [PHP] PHPDiscuss.com


 Aren't there already hundreds of these things out there?

 I can't imagine why I'd use a clumsy, slow web interface to a forum that I
 have to keep checking/returning to when I can satisfy 99% of my problems
 with this mailing list.

 It's as simple as sending, checking and replying to emails :)


 Justin French


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Announcement: FUDforum 2.2.2 Released

2002-07-12 Thread Jeff Lewis

Tried going to the official announcement and got this:

query failed: %( SELECT fud_forum.id, fud_forum.name, fud_cat.name AS
cat_name, fud_cat.id AS cat_id, fud_msg.post_stamp AS msg_post_stamp FROM
fud_cat INNER JOIN fud_forum ON fud_cat.id=fud_forum.cat_id LEFT JOIN
fud_msg ON fud_forum.last_post_id=fud_msg.id WHERE fud_forum.id IN
(,,,) ORDER BY fud_cat.view_order, fud_forum.view_order )%
because %( You have an error in your SQL syntax near ',,) ORDER
BY fud_cat.view_order, fud_forum.view_order ' at line 14 )%


- Original Message -
From: Ilia A. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 12, 2002 9:23 AM
Subject: [PHP] Announcement: FUDforum 2.2.2 Released


 A major upgrade of the 2.2X FUDforum with many bug fixes and a number of
new
 features.

 The official announcement can be found here:
 http://fud.prohost.org/forum/index.php?t=msgth=724

 Detailed ChangeLog:
 http://fud.prohost.org/CHANGELOG

 Download Page:
 http://fud.prohost.org/download.php

 Ilia Alshanetsky
 FUDforum Core Developer
 [EMAIL PROTECTED]

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHPDiscuss.com

2002-07-12 Thread Jeff Lewis

Is it like http://www.phptalk.com ? Like just discussion or are their tutorials etc?

Jeff


I have started a new website devoted strictly to discussing development with
PHP.  If anyone is interested, you can see it at http://www.phpdiscuss.com.




Re: [PHP]Erik Hegreberg

2002-07-09 Thread Jeff Lewis

He is both, he has been emailed how to get off. For now, I keep just sending
my read receipts :)


- Original Message -
From: R'twick Niceorgaw [EMAIL PROTECTED]
To: Erik Hegreberg [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 6:30 PM
Subject: Re: [PHP]
ipoh'%%%
%%%


 are you doped  or mentally challenged ?
 - Original Message -
 From: Erik Hegreberg [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 09, 2002 12:26 PM
 Subject: [PHP]

ipoh'%%%
 %%%






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Getting value back from fsockopen?

2002-06-27 Thread Jeff Lewis

Currently I am using fsockopen on my IP and a port and when sending a UDP
request it always says it's open. Now, what I'm trying to do is see if I
have an application running on there. This application listens to the port
I'm trying to hit.

Is there a way with fsockopen I can do this? Instead of hitting and saying
open all the time I can return some value? The listening application in a
compiled exe, not a PHP or any kind of application I can add code to send
information with...

Code I am using currently:

?
$fp = fsockopen(udp://IP, 5121, $errno, $errstr);
if (!$fp) {
echo ERROR: $errno - $errstrbr\n;
} else {
echo(Server up!);
 echo(BRHandle: .$fp);
}
?

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Best Delete Confirmation Script

2002-06-27 Thread Jeff Lewis

Shane,

I use a javascript prompt. When you click OK, it passes the information on
to the PHP script to do the work :)

Jeff
- Original Message -
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 12:48 PM
Subject: [PHP] Best Delete Confirmation Script


Greetings.

I would like your opinions on the best way to implement an Are You Sure You
Want To Do This? dialog for an Admin user when they go to delete a record
in a DB.

Do you find that a whole page is usually required for this, or does anyone
have any nice pop up solutions for such a query.

Sure... I hate doing these things too, but when Joe Big Boss gets a bit
trigger happy and kills some data he mistakenly thought was a different
record. You KNOW who is going to hear about it from on high.  :^)

Thanks gang!
- NorthBayShane

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Synchronize FTP sites with PHP?

2002-06-26 Thread Jeff Lewis

We're using a FTP Control program here but it's very old and I'm wondering
if anyone has used PHP to sync up FTP sites, to connect to a remote server
and check if there is anything new...

Not quite sure where to start with it though...

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Forum / Web Mail Combined?

2002-06-12 Thread Jeff Lewis

Ed,

Currently none to my knowledge, however, YaBB SE 2 which is in development
has this feature roughed in already. However, it's still in development.

Jeff
- Original Message -
From: Lazor, Ed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 1:35 PM
Subject: [PHP] Forum / Web Mail Combined?


 Ilia and I were discussing FUDForum and general forum features.  That made
 me wonder... Are there forums that integrate pop3 web mail support?

 -Ed




 This message is intended for the sole use of the individual and entity to
 whom it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law.  If you are
 not the intended addressee, nor authorized to receive for the intended
 addressee, you are hereby notified that you may not use, copy, disclose or
 distribute to anyone the message or any information contained in the
 message.  If you have received this message in error, please immediately
 advise the sender by reply email and delete the message.  Thank you very
 much.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] FUDforum 2.0 Stable Released

2002-06-10 Thread Jeff Lewis

Is it just me or the forum area totally overflowing with choices? I often
wonder why people don't pool talents and work on really great products,
instead people break off and make their own system - quite unusual...


Jeff

- Original Message -
From: Ilia A. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 1:54 PM
Subject: [PHP] FUDforum 2.0 Stable Released


 FUDforum 2.0 is a web forum released under the GPL license, written in
PHP4
 utilizing a MySQL database backend.
 The forum is completely customizable via a templating system, which is
 compiled for optimal performance. The templating
 system also has integrated i18n support, which allows the forum to be used
in
 other languages, at this time there are 5
 different languages to, which translations are available in the standard
 distribution and more will be available soon.
 The spell checker integrated into the forum, which utilizes pspell library
 also has multi-lingual support,
 thus permitting even the non English speakers to spell check their
messages.
 FUDforum 2.0 also includes a powerful user group management system, that
 allows fine grained control over the users of the forum,
 for the administrator as well as the group manager(s) assigned by the
 administrator.
 In addition to these features, the forum contains all the other features
you
 may have come to expect from a web forum, such as the
 ability to attach files to messages, include polls, private messaging
system,
 FUDcode, which allows the user to style their text
 without the need for HTML, thread  forum subscriptions with both e-mail 
ICQ
 notification, buddy and ignore lists, a full text search
 and many more.
 Despite all these features, FUDforum is extremely fast and scales
extremely
 well, by using MySQL indexes and table views implemented in PHP
 to retrieve the data in the most expedient manner possible. The result, is
 that most forum pages take ~0.01-0.02 seconds to generate on
 most computers, even while the forum is under a heavy load.
 The forum, by default is setup with very secure file permissions, that are
 designed in such a way that given a reasonably well setup web
 server, your forum's data will be safe against hackers.

 You can download FUDforum from http://fud.prohost.org/download.php and if
you
 have any questions, there is a support forum at
 http://fud.prohost.org/forum/, where you can get answers to your questions
and
 concerns about the forum.

 Ilia Alshanetsky
 [EMAIL PROTECTED]
 FUDforum Core Developer




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Failed opening '' for inclusion...

2002-05-30 Thread Jeff Lewis

I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine and
then decided to get MSSQl running as well. So I ran into a problem where it
failed to load the DLL. I read through the archives and it said to make sure
I have the most up to date DLL, so I then installed 4.2.1.

Now, when I run my scripts I get this error:

2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')

I can NOT find anywhere that this php4\pear is set!

Would appreciate any help that could be offered.

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Failed opening '' for inclusion...

2002-05-30 Thread Jeff Lewis

Yes and that isn't in there (php4\pear). I looked in the php.ini in windows
and in php folders...

Jeff
- Original Message -
From: Martin Towell [EMAIL PROTECTED]
To: 'Jeff Lewis' [EMAIL PROTECTED]; PHP General
[EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 8:20 PM
Subject: RE: [PHP] Failed opening '' for inclusion...


 have you looked in php.ini ?

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 10:19 AM
 To: PHP General
 Subject: [PHP] Failed opening '' for inclusion...


 I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine
and
 then decided to get MSSQl running as well. So I ran into a problem where
it
 failed to load the DLL. I read through the archives and it said to make
sure
 I have the most up to date DLL, so I then installed 4.2.1.

 Now, when I run my scripts I get this error:

 2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')

 I can NOT find anywhere that this php4\pear is set!

 Would appreciate any help that could be offered.

 Jeff



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Failed opening '' for inclusion...

2002-05-30 Thread Jeff Lewis

Martin,

I appreciate the help...still have NO idea where the php4\pear was coming
from. However, fixed things by turning on register_globals for now. The old
scripts need to be brought up to par to the new methods...so when I was
doing an include_once it wasn't looking for any file.

So off to update the scripts!

Jeff
- Original Message -
From: Martin Towell [EMAIL PROTECTED]
To: 'Jeff Lewis' [EMAIL PROTECTED]; PHP General
[EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 8:33 PM
Subject: RE: [PHP] Failed opening '' for inclusion...


 Do you have an auto-prepend file? If so, maybe it's in there ???
 If not, I'm stumped

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 10:31 AM
 To: Martin Towell; PHP General
 Subject: Re: [PHP] Failed opening '' for inclusion...


 Yes and that isn't in there (php4\pear). I looked in the php.ini in
windows
 and in php folders...

 Jeff
 - Original Message -
 From: Martin Towell [EMAIL PROTECTED]
 To: 'Jeff Lewis' [EMAIL PROTECTED]; PHP General
 [EMAIL PROTECTED]
 Sent: Thursday, May 30, 2002 8:20 PM
 Subject: RE: [PHP] Failed opening '' for inclusion...


  have you looked in php.ini ?
 
  -Original Message-
  From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
  Sent: Friday, May 31, 2002 10:19 AM
  To: PHP General
  Subject: [PHP] Failed opening '' for inclusion...
 
 
  I am running PHP 4.2.1 on Windows XP. I had 4.1.2 running perfectly fine
 and
  then decided to get MSSQl running as well. So I ran into a problem where
 it
  failed to load the DLL. I read through the archives and it said to make
 sure
  I have the most up to date DLL, so I then installed 4.2.1.
 
  Now, when I run my scripts I get this error:
 
  2: Failed opening '' for inclusion (include_path='.;c:\php4\pear')
 
  I can NOT find anywhere that this php4\pear is set!
 
  Would appreciate any help that could be offered.
 
  Jeff
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] 4.2.1 Vars

2002-05-25 Thread Jeff Lewis

For now you can add this to the top of your scripts:

$types_to_register = array('GET','POST','COOKIE','SESSION','SERVER');
  foreach ($types_to_register as $type) {
$arr = @${'HTTP_' . $type . '_VARS'};
if (@count($arr)  0) {
  extract($arr, EXTR_OVERWRITE);
}
  }

Somebody else posted this a few weeks back and it has worked for me until I
can convert everything over...

Jeff
- Original Message -
From: Kurth Bemis (List Monkey) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, May 25, 2002 3:23 PM
Subject: [PHP] 4.2.1 Vars



 After moving to php 4.2.1 my scripts that use xxx.php?blah=4 fail to work.

 I know that i need to turn register_globals on in my config, however I
know
 that there are security problems with this.  So bascially I need to know
 how to make 500+ scripts work without editing a bunch of files to make it
 so that all my get and post vars start with $_POST and $_GET

 any ideas?

 ~kurth

 Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer

 Security is like an arms race; the best attackers will continue to search
 for more complicated exploits, so we will too.
 Quoted from http://www.openbsd.org/security.html

 [EMAIL PROTECTED] | http://kurth.hardcrypto.com
 PGP key available - http://kurth.hardcrypto.com/pgp

 Fight Weak Encryption!  Donate your wasted CPU cycles to Distributed.net
 (http://www.distributed.net)



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Bulletin Boards

2002-05-18 Thread Jeff Lewis

Never used Phorums as it didn't have what I was looking for.  Tried phpBB
but the admins ection is awful IMHO.  I currently use YaBB SE which has a
very fast development time.

Jeff
- Original Message -
From: Richard Baskett [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Saturday, May 18, 2002 4:51 AM
Subject: [PHP] Bulletin Boards


 Has anybody used phpBB  Phorum?  And if so, which did you like better
and
 why?  And if you've used other systems.. Which did you like best and why?
 Thanks! :)

 Rick

 We should be taught not to wait for inspiration to start a thing.  Action
 always generates inspiration.  Inspiration seldom generates action. -
Frank
 Tibolt


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Restricting image height and width in a message

2002-05-17 Thread Jeff Lewis

Currently, people can post links to images in an application I am using but
they can post something outrageous like 1000X800 pixels and it messes thing
up on the format.  I was sent this as a solution but it really bogs down
especially on images from certain servers.  Is there a better way to do
this?

The $modSettings come from a settings file and are set by me, so 250X100 for
example.

$maxwidth = $modSettings['maxwidth'];
 $maxheight = $modSettings['maxheight'];
 if(!($maxwidth==0  $maxheight==0)){
  preg_match_all('/img src=(http:\/\/.+?) alt= border=0/is',
$message, $imgmatches, PREG_PATTERN_ORDER);
  for($i=0; $icount($imgmatches[1]); $i++){
   $imagesize = getimagesize($imgmatches[1][$i]);
   $width = $imagesize[0];
   $height = $imagesize[1];
   if($width$maxwidth || $height$maxheight){
if($width$maxwidth  $maxwidth!=0){
 $height = floor($maxwidth/$width*$height);
 $width = $maxwidth;
 if($height$maxheight  $maxheight!=0){
  $width = floor($maxheight/$height*$width);
  $height = $maxheight;
 }
}else{
 if($height$maxheight  $maxheight!=0){
  $width = floor($maxheight/$height*$width);
  $height = $maxheight;
 }
}
   }
   $imgnew[$i] = img src=\ . $imgmatches[1][$i] . \ width=\$width\
height=\$height\ alt=\\ border=\0\;
  }
  $message = str_replace($imgmatches[0], $imgnew, $message);
 }


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Forum with PHP, without using mySQL..

2002-05-06 Thread Jeff Lewis

Actually... the version of YaBB at yabbforum.com is strictly a Perl based board.  It 
doesn't use mySQL either.  The PHP version of YaBB is at http://www.yabb.info but it 
relies on mySQL.

There is Easy Forum http://www.hotscripts.com/Detailed/15435.html
There is Eboard http://www.hotscripts.com/Detailed/14778.html

And more, check out: 
http://www.hotscripts.com/PHP/Scripts_and_Programs/Discussion_Boards/

Jeff



 
www.yabbforum.com
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



Re: [PHP] Re: Forum with PHP, without using mySQL..

2002-05-06 Thread Jeff Lewis

he MAY have been thinking of the PHP version which is at www.yabb.info and
also in use over at http://www.phptalk.com

Jeff
- Original Message -
From: John Fishworld [EMAIL PROTECTED]
To: Mizery De Aria [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 10:29 AM
Subject: Re: [PHP] Re: Forum with PHP, without using mySQL..


 Why bother posting a perl forum here !

 YaBB is a leading FREE, downloadable Perl forum that allows you to provide
a
 real-time chat and support system for your visitors. While chat programs
 allow people to talk directly, you have to be on them 24/7 to please
 everyone. With forum software like YaBB, you can talk any time, and
everyone
 can join or read the conversation. So get visitors coming back, for
 interesting discussions, fun chit chat, or needed support without having
to
 spend thousands of dollars.



  www.yabbforum.com
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Anyone use frames and PHP solution?

2002-05-06 Thread Jeff Lewis

I've looked through the archive and seen that people have attempted it but I
am wondering if anyone has actually gone forward with using PHP and frames
together.

I ask as I am using a very simple frame interface.  Left side contains a
menu system with all content etc on right.  I have a login box on the left
but when pressing submit it logs in ok but in the menu.

So wondering if anyone has managed to find a good solution for the two
combined...

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP 4.2.0 on win2k, can't use mysql_fetch_* functions

2002-04-29 Thread Jeff Lewis

Austin,

I am using 4.2 on a W2K machine at work and have had no problems with the
mysql_fetch_* functions.

Only thing I had to get used to was the new way to handle globals.
Jeff
- Original Message -
From: Austin W. Marshall [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 3:52 PM
Subject: [PHP] PHP 4.2.0 on win2k, can't use mysql_fetch_* functions


 Is there something about the php 4.2.0 windows binary (installer
 version) that renders the mysql_fetch_* functions useless?

 I installed php 4.2.0 on windows 2000 along with Apache 1.3.24 and MySQL
 3.23.49, and in a script i have a simple SELECT statement.  The content
 is in the database, the query executes successfuly, but it's as if
 mysql_fetch_array and mysql_fetch_row functions don't return anything.
  I know mysql support is built-in (as indicated on php.net) and working,
 because i was able to use php to insert data into the database.  On that
 one computer i was able to recreate the problem consistently and in no
 situation would mysql_fetch array or _row return anything.

 I haven't had the opportunity to try this on any other win2k boxen, but
 am not having any problems in Linux or OpenBSD.  Is anyone else
 experiencing any problems?


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] BBS system

2002-04-26 Thread Jeff Lewis

Try YaBB SE http://www.yabb.info


- Original Message -
From: r [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 27, 2002 7:21 AM
Subject: [PHP] BBS system


 Hey all,

 Just a small q,
 does anybody know of any particular good BBS system that is free?  (I aint
 rich :-(   ) Been to hotscripts.com can you recomend any?

 (Actually if i were rich I would not care a damn for
 PHP-MySql-Apache-Java-ASP-JSP hell, i wouldnt even touch a computer,
 would be happy being computer illiterate, would have been partying with a
 lot of babes instead...hehhehe maybe thats why i aint rich...have too
 wicked a mind? )

 Ohh well
 Cheers,
 -Ryan.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Sessions not staying a session...

2002-04-25 Thread Jeff Lewis

I am storing session information by using $_SESSION[privs] and it works for
the first screen but when I click on the next link it doesn't seem to carry
over.  Do I need to declare session start with this method?  Do I need to
make it global?

Jeff





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Sessions not staying a session...

2002-04-25 Thread Jeff Lewis

I was under the assumption that it did...I have aded session_start and it
still doesn't work.

Jeff
- Original Message -
From: Vail, Warren [EMAIL PROTECTED]
To: 'Craig Donnelly' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 25, 2002 12:04 PM
Subject: RE: [PHP] Re: Sessions not staying a session...


 Curious, does anyone know if the $_SESSION[privs] technique bypasses
 important session management features implemented in
 session_register(variable) ??

 Warren Vail
 Tools, Metrics  Quality Processes
 (415) 667-7814
 Pager (877) 774-9891
 215 Fremont 02-658


 -Original Message-
 From: Craig Donnelly [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 9:05 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Sessions not staying a session...


 You should use session_start(); on every page that u want to pass session
 information..

 Craig

 Jeff Lewis [EMAIL PROTECTED] wrote in message
 00d601c1ec72$072a63d0$76a1a8c0@LEWISJCIT">news:00d601c1ec72$072a63d0$76a1a8c0@LEWISJCIT...
  I am storing session information by using $_SESSION[privs] and it works
 for
  the first screen but when I click on the next link it doesn't seem to
 carry
  over.  Do I need to declare session start with this method?  Do I need
to
  make it global?
 
  Jeff
 
 
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] 4.2 new GLOBALS question

2002-04-25 Thread Jeff Lewis

I am working on an odler script which loads up in index.php and a URL is passed 
usually like index.php?s=something

Now, around line 10 of index.php I do an include that pulls the value of s via 
HTTP_POST_VARS and then I dump it into $start.

It used to work just fine and still does except on 4.2.  After line 10, I need to see 
what was contained in that $start but i can't figure out the new method to make this 
global.  I tried adding it to $GLOBALS but fear I'm not doing it correctly.  Was 
trying $GLOBALS['start'] = $start and then trying to reference it with 
$GLOBALS['start']

What am i doing wrong?

jeff



Re: [PHP] 4.2 new GLOBALS question

2002-04-25 Thread Jeff Lewis

Excuse me, you're right.  I was using this include as a preprocess step as
I was using ; to seperate arguments in the query string like this
index.php?s=something;t=thing

The preprocess step was breaking them apart and then I was doing this:

$start = isset($HTTP_GET_VARS['s']) ? $HTTP_GET_VARS['s'] : '';

Then back in index I did a if ($start == somevalue)

However, with 4.2, the $start is no longer populated.

If I add an echo $start; right after the include, in 4.1.2 and below, it
would echo the value of $start but now it keeps turning up empty.

Jeff
- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: 'Jeff Lewis' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 25, 2002 10:13 PM
Subject: RE: [PHP] 4.2 new GLOBALS question


  I am working on an odler script which loads up in index.php and a URL
 is
  passed usually like index.php?s=something
 
  Now, around line 10 of index.php I do an include that pulls the value
 of s
  via HTTP_POST_VARS and then I dump it into $start.

 What do you mean you dump it into $start?? Where is $start coming
 from? Also, if you are using index.php?s=something, then 's' will be in
 HTTP_GET_VARS or _GET ...not POST.

 ---John Holmes...







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP

2002-04-16 Thread Jeff Lewis

Another one is http://www.phptalk.com


- Original Message -
From: Martin Cabrera Diaubalick [EMAIL PROTECTED]
To: Jason Whitaker [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 16, 2002 7:11 AM
Subject: Re: [PHP] PHP


 It's a Forum, not a chat.

 http://forums.knowledgeisland.com/list.php?f=1

 HTH
 Regards

 El Mar 16 Abr 2002 13:00, Jason Whitaker escribió:
 I am looking for a PHP chat for disscussing php/mysql. anyone know of
any?
 
 --
 
 Jason Whitaker

 --
 Martin Cabrera Diaubalick
 Director Técnico Notodo.com
 [EMAIL PROTECTED]

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Problem grabbing value of session

2002-04-16 Thread Jeff Lewis

I am in a function called Login2 in which I call the following:

session_start();
session_register(valid_user);
session_register(privs);

valid_user contain a name - Jim
privs contains a number -1

Right after I call those I try a is_registered and it showed that these
registered correctly.  I removed that code and added a call to another
function: redirectinternal();

That function is below:

function redirectinternal () {
 global $valid_user,$privs;

 echo Login good!;
 echo BR.$valid_user. - .$privs.$temp;

}

Now, I can't seem to get those values to print to the screen.  I added a
session_start before the echo and I just can't get my values out...what am I
missing?

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Problem grabbing value of session

2002-04-16 Thread Jeff Lewis

I've decided to use the _SESSION method instead and it works just fine :)
So...thanks for suggesting that method, as it does look neater in the code
as well.

Jeff
- Original Message -
From: Erik Price [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, April 16, 2002 2:42 PM
Subject: Re: [PHP] Problem grabbing value of session



 On Tuesday, April 16, 2002, at 02:40  PM, Jeff Lewis wrote:

  Right after I call those I try a is_registered and it showed that these
  registered correctly.  I removed that code and added a call to another
  function: redirectinternal();

 You can avoid the whole session_register() business if you simply
 refer to these variables as $_SESSION['valid_user'] and
 $_SESSION['privs'] -- after all, that's what they are, simply session
 variables.  By using this convention, you clarify exactly what kind of
 variables they are each time you write them, which is good for
 legibility later in the future.  Also, you don't need to declare them as
 global in your redirectinternal() function, since any $_* variable is
 considered global at all times.

  That function is below:
 
  function redirectinternal () {
   global $valid_user,$privs;
 
   echo Login good!;
   echo BR.$valid_user. - .$privs.$temp;
 
  }
 
  Now, I can't seem to get those values to print to the screen.  I added a
  session_start before the echo and I just can't get my values out...what
  am I
  missing?

 You'll have to post the context of this function (how it is called in
 the script) for an answer to this question.


 Erik





 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Besy way to ban a user?

2002-04-08 Thread Jeff Lewis

We've used email ban and IP ban but there are easy ways around this as you
all know.  I am wondering if there is anything a little more hardcore to do
as far as banning goes.  I had read somewhere about grabbing a MAC address
or something similar from a network card.  Has anyone heard of this method
or does anyone already use a pretty solid method?

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Phpfx, what is it?

2002-03-20 Thread Jeff Lewis

You can also give YaBB SE a shot http://www.yabb.info


- Original Message -
From: Chuck PUP Payne [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Wednesday, March 20, 2002 7:11 PM
Subject: [PHP] Phpfx, what is it?


 Hi,

 I was sourgeforge.net looking at the PHP stuff, I saw something call
phpfx,
 but it not clear what it is or what it does. Has anyone mess with it?

 Also I am looking for a php program that was written so that you can do a
 BBS, I wanted to use Ultimate Bulletin Board, but they no longer support
the
 freeware verision, you have to pay almost $500 for it. The verision I have
 the date is not Y2K, so the dates come out 19100. So I need to replace the
 BBS, it was written with perl and I like to have something well you guys
 know.

 One last question for now. Is there a site that explain how to do list in
 php with colors, I want to add color to my lists, when I do thinks now
there
 are so boring, with just white.

 Thanks a head of time...By the way


  
  | Chuck Payne  |
  | Magi Design and Support  |
  | www.magidesign.com   |
  | [EMAIL PROTECTED]   |
  

 BeOS, Macintosh 68K, Classic, and OS X, Linux Support.
 Web Design you can afford.

 Never be bullied into silence. Never allow yourself to be made a victim.
 Accept no one's definition of your life; define yourself.- Harvey
Fierstein



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP returns this error... (1030: Got error 28 from table handler)

2002-03-05 Thread Jeff Lewis

I was returned this error after a mysql_query:

1030: Got error 28 from table handler

What does this mean?  It doesn't happen all the time and it almost random...
I searched the mysql site and didn't find anything and a search on Google I
found that it is a table that may have become corrupt so i have repaired the
tables.

Has anyone else received this error?  If so, how did you solve it?

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP returns this error... (1030: Got error 28 from table handler)

2002-03-05 Thread Jeff Lewis

More digging has turned up that the disk space is low or running out...so I
will look into that.

However, if anyone has any tips I'd greatly listen :)

Jeff
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 2:51 PM
Subject: [PHP] PHP returns this error... (1030: Got error 28 from table
handler)


 I was returned this error after a mysql_query:

 1030: Got error 28 from table handler

 What does this mean?  It doesn't happen all the time and it almost
random...
 I searched the mysql site and didn't find anything and a search on Google
I
 found that it is a table that may have become corrupt so i have repaired
the
 tables.

 Has anyone else received this error?  If so, how did you solve it?

 Jeff


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Problem with global variables?

2002-03-01 Thread Jeff Lewis

We have some software where there is a form that people can enter a message
in.  When submitting the form, it is directed to a function that has global
declarations for the subject and message of the post.

This worked up until yesterday.  And it didn't just happen on one site, it
stopped on several sites...

Did anyone have the same thing or has anyone ever heard of this happening?

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Freeing up locked table?

2002-02-25 Thread Jeff Lewis

Sometimes when using PHP/mySQL I have encountered a locked table.  I have no
idea why it occurs, I am not explicitly locking the tables but sometimes in
phpmyadmin it says in use.  Is there a way to unlock this table using
PHP?

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: ? re phpwebhosting.com - still in business??

2002-02-24 Thread Jeff Lewis

They are very questionable.  Have had heard many complaints from clients and
associates about these guys shutting down sites without warning, anything
that starts to get a few hits seems to be an issue with them...

Again, you get what you pay for people :)

Jeff
- Original Message -
From: jtjohnston [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 5:44 PM
Subject: [PHP] Re: ? re phpwebhosting.com - still in business??


 What's their deal? How do they offer all that and be so cheap?
 Using my site like Geocities to advertise?
 http://www.phpwebhosting.com/host_details.html
 J




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Possible to measure CPU and Ram used with PHP?

2002-01-29 Thread Jeff Lewis

Is it possible to measure the amount of RAM or CPU power used to process a
particular file written in PHP?  Can the values be grabbed and displayed
with PHP?

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Opening more than one database at a time?

2002-01-20 Thread Jeff Lewis

I am trying to basically copy data from one database to another and am
wondering if it is possible to have more than one database open at a time.
So for example, I want to do something like this but am wondering if there
is a better way:

$dbcon = mysql_connect($db_server, $db_user, $db_passwd);  //Make source
connection
mysql_select_db($db_name);
//Select source db
$source_result = mysql_query(SELECT * FROM users); //Select all
info from users table
while ($row_cat = mysql_fetch_array($result)){
//Loop through and insert into new db
 //Insert into new database
}

So where I have Insert into new database this is where I want to take some
of the information from the source and insert into the new database (which
uses a different user name and password as well).

Any help would be greatly appreciated :)

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Opening more than one database at a time?

2002-01-20 Thread Jeff Lewis

Not sure, the tables are in different databases with different users and
passwords.  I will look into it but the answer I got this afternoon
satisfied me :)

Jeff
- Original Message -
From: Miles Thompson [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, January 20, 2002 8:51 PM
Subject: Re: [PHP] Opening more than one database at a time?


 Jeff,

 Can you let MySQL do the work for you, with INSERT ... SELECT? Here's the
URL
 http://www.mysql.com/doc/I/N/INSERT_SELECT.html

 HTH - Miles Thompson


 At 06:20 PM 1/20/2002 -0500, Jeff Lewis wrote:
 I am trying to basically copy data from one database to another and am
 wondering if it is possible to have more than one database open at a
time.
 So for example, I want to do something like this but am wondering if
there
 is a better way:
 
 $dbcon = mysql_connect($db_server, $db_user, $db_passwd);  //Make source
 connection
 mysql_select_db($db_name);
 //Select source db
 $source_result = mysql_query(SELECT * FROM users); //Select all
 info from users table
 while ($row_cat = mysql_fetch_array($result)){
 //Loop through and insert into new db
   //Insert into new database
 }
 
 So where I have Insert into new database this is where I want to take
some
 of the information from the source and insert into the new database
(which
 uses a different user name and password as well).
 
 Any help would be greatly appreciated :)
 
 Jeff
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] phpbb and ikonboard forum scripts

2001-12-25 Thread Jeff Lewis

Never thought I'd see this pop on here :)  As mentined before, Ikonboard is
in fact Perl and up until recently was only flatfile.  Another you may want
to try is http://www.yabb.info (PHP/mySQL combo)

Jeff
- Original Message -
From: Indera [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 25, 2001 4:49 PM
Subject: [PHP] phpbb and ikonboard forum scripts


 Hello,

 I am trying to decide between these two scripts and was wondering if
anyone has either of them
 installed. The one thing I need that I can't figure out if either of them
have is whether or not, I
 can hide categories (that contain the forums and topics) on the category
page and based on a users
 log-in have them enabled. If that is not possible is it possible to create
2 category pages and
 store them in one database, (hosting company only allows one instance of a
forum script to be
 installed) one for the forums that everyone that comes to my site can see
and another category page
 that will actually only be available in the restricted members only page.

 If it helps, here are the links
 http://www.phpbb.com and http://www.ikonboard.com

 I think I prefer the phpbb forum because ikonboard uses cgi scripts, or it
least that's what it
 looks like.

 Any help would be greatly appreciated.

 Thanks
 Indera




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Using @file

2001-12-10 Thread Jeff Lewis

I am using this line in part of my code but am getting an error that looks like below:

Code:
$serverDetails = @file(http://www.myserver,com/versions.php?l=$scripturlv=$version;);

Error:
2: php_network_getaddresses: gethostbyname failed 
(c:\inetpub\wwwroot\yabbse\Sources\Admin.php ln 43)

What would be causing this error?  It works on some machines but not others?

Jeff



Re: [PHP] Using @file

2001-12-10 Thread Jeff Lewis

Sorry that was a typo, it is a period, I mistyped into the email.  If it
cant resolve the name, what would cause that problem?

Jeff
- Original Message -
From: Darren Gamble [EMAIL PROTECTED]
To: 'Jeff Lewis' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 3:19 PM
Subject: RE: [PHP] Using @file


 Good day,

 The error means that it can not resolve the name.

 Replace the comma in the name with a period.

 
 Darren Gamble
 Planner, Regional Services
 Shaw Cablesystems GP
 630 - 3rd Avenue SW
 Calgary, Alberta, Canada
 T2P 4L4
 (403) 781-4948


 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 10, 2001 1:24 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Using @file


 I am using this line in part of my code but am getting an error that looks
 like below:

 Code:
 $serverDetails =
 @file(http://www.myserver,com/versions.php?l=$scripturlv=$version;);

 Error:
 2: php_network_getaddresses: gethostbyname failed
 (c:\inetpub\wwwroot\yabbse\Sources\Admin.php ln 43)

 What would be causing this error?  It works on some machines but not
others?

 Jeff




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using @file

2001-12-10 Thread Jeff Lewis

Again, this works on some servers and othes not.  Does IIS support this
particular function?

Jeff
- Original Message -
From: Darren Gamble [EMAIL PROTECTED]
To: 'Jeff Lewis' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 3:32 PM
Subject: RE: [PHP] Using @file


 Good day,

 Again, this error means that the server can not resolve a name.

 Please ensure that the name www.myserver.com can be DNS resolved.  Please
 contact your DNS administrator if it can not.

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 10, 2001 1:32 PM
 To: Darren Gamble; [EMAIL PROTECTED]
 Subject: Re: [PHP] Using @file


 Sorry that was a typo, it is a period, I mistyped into the email.  If it
 cant resolve the name, what would cause that problem?

 Jeff
 - Original Message -
 From: Darren Gamble [EMAIL PROTECTED]
 To: 'Jeff Lewis' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, December 10, 2001 3:19 PM
 Subject: RE: [PHP] Using @file


  Good day,
 
  The error means that it can not resolve the name.
 
  Replace the comma in the name with a period.
 
  -Original Message-
  From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
  Sent: Monday, December 10, 2001 1:24 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Using @file
 
 
  I am using this line in part of my code but am getting an error that
looks
  like below:
 
  Code:
  $serverDetails =
  @file(http://www.myserver,com/versions.php?l=$scripturlv=$version;);
 
  Error:
  2: php_network_getaddresses: gethostbyname failed
  (c:\inetpub\wwwroot\yabbse\Sources\Admin.php ln 43)
 
  What would be causing this error?  It works on some machines but not
 others?
 
  Jeff
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Qukc days to time() conversion?

2001-12-05 Thread Jeff Lewis

I am prompting users for a number of days and then wanting to pull items from a 
database older than the number of days.  All dates are stored as timestamps in the 
database so wondering how I can come up witht he required timestamp to compare with? 
(for for example 30 days).

I have a difference conversion between the two timestamps but don't have it to that I 
can find the timestamp to search on...

Jeff



Re: [PHP] md5 decrypt

2001-12-05 Thread Jeff Lewis

I'm pretty sure you can't.  You would have to set up an area where they can
have their password reset and the new password emailed to their email
address.

Jeff
- Original Message -
From: Dan McCullough [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]
Sent: Wednesday, December 05, 2001 2:21 PM
Subject: [PHP] md5 decrypt


 Is there away to take a md5 encrypted password and decrypt it and give
that to the client, if they
 fogot their password.

 =
 dan mccullough
 
 Theres no such thing as a problem unless the servers are on fire!


 __
 Do You Yahoo!?
 Buy the perfect holiday gifts at Yahoo! Shopping.
 http://shopping.yahoo.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Updating parts of files without rewriting them

2001-12-01 Thread Jeff Lewis

I have a file that contains settings and there are a lot of comments in
there and a lot of variables.  An excerpt of the file looks like below.  My
question is, is it possible to change only certain variables?  For example,
I want to set just the db variables, is it possible for me to input the new
values in a form and replace only those in the file without having to
rewrite the entire file?

$mailtype = 0; # 0 - sendmail, 1 - SMTP

## Database Info ##
$db_name = name;
$db_user = user;
$db_passwd = pass;
$db_server = localhost;

## Directories/Files ##
# Note: directories other than $imagesdir do not have to be changed unless
you move things

$boarddir = .; # The absolute path to the folder (usually can be left
as '.')
$sourcedir = ./Sources;   # Directory with source files



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question regarding mysql_connect/pconnect

2001-11-29 Thread Jeff Lewis

I was typically using pconnect but then read that for very busy sites you
can reach the max threads for mySQL quickly.  So on my new server I have a
couple of scripts and they are using mysql_connect.

I was under the impression that these disconnected after script execution
but when checking, there are over 100 of the threads open yet not being
used.

Has anyone had this or know how to combat it?

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Regular Expressions.

2001-11-20 Thread Jeff Lewis

I'm trying to port over some Perl to PHP and have come to a string of regular 
expressions like this.  There are probably 30 of them:

$message =~ s~\[color=([\w#]+)\](.*?)\[/color\]~font color=$1$2/font~isg;
$message =~ s~\[black\](.*?)\[/black\]~font color=00$1/font~isg;
$message =~ s~\[white\](.*?)\[/white\]~font color=FF$1/font~isg;

How can I accomplish the same in PHP?

$message = preg_match (\[color=([\w#]+)\](.*?)\[/color\], font 
color=$1$2/font)

I was thinking that is how it would be done but I am getting errors.

Jeff




Re: [PHP] Question on variable variables

2001-11-17 Thread Jeff Lewis

Thanks Jason and Christoper for replying, here is the solution I came up
with.  It takes into account that there could be multiple instances of what
I'm looking for on the same line - got it working late last night:

while (preg_match (/yabb\s+(\w+)/,$curline,$tags))
   $curline = preg_replace(/yabb\s+$tags[1]/,${$tags[1]},$curline);

Jeff
- Original Message -
From: Jason G. [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, November 17, 2001 7:02 AM
Subject: Re: [PHP] Question on variable variables


 It seems to me that the use of a temp variable may be the clearest
 solution, and I doubt any overhead would matter really.

 $a = dog;
 $tmp = MY.$a; //$tmp = MYdog;

 So the following two would be the same:
 $$tmp = Spot;
 $MYdog = Spot;

 Good Luck,

 Jason Garber
 IonZoft.com

 At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote:
 I've a question regarding variable variable I was hoping someone could
 help me with:
 
 All the examples in the manual have the entire variable name being
 variable e.g.
 $a = hello   and
 $$a being the same as $hello
 
 What I need to do, however, is append a variable portion to a constant
 prefix.  So I have a set of variables that are named $MYdog, $MYcat etc.
 and I need to do
 
 $a = dog
 ${MY$a} being the same as $MYdog
 
 Can this be done, and if so - how? I can't get it to work.
 
 Jeff





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] problem with image

2001-11-17 Thread Jeff Lewis

I would think it's an HTML problem, try:

echo img src=\image.gif\;

or

echo 'img src=image.gif';

Jeff
- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 17, 2001 11:20 AM
Subject: [PHP] problem with image


 when i want to put an image like this (echo img src='image.gif';), my
 php is not able to show the image?
 
 is there something wrong with my php.ini??
 
 greetings
 wolf.dietrich von loeffelholz
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Difference of queries in PHP/mySQL?

2001-11-17 Thread Jeff Lewis

I am wondering if there are any difference between using PHP and using the
command line for mySQL.  Entering this at the comman line returns all the
membergroups properly.  When I use this in my PHP program, it doesn't
continue past this line:

$request = mysql_query(SELECT membergroup FROM membergroups WHERE 1 ORDER
BY ID_GROUP);


Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Converting dates?

2001-11-17 Thread Jeff Lewis

I am storing a birthdate in my database as a Unix timestamp but when I
display it I want to calculate the different between that date and todays
date and display the persons age.

How can I do that with PHP?

I also want to know if it is currently their birthday.  So trying to set
$isbday to yes if todays month and day are the same as their birthdate in
the database.

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Converting dates?

2001-11-17 Thread Jeff Lewis

Yes thanks for that, I already have this but am having a brain cramp on how
to obtain years.

function datediff($now, $old)
{
  /
  $DIS = $now - $old; // Diff In Secs
  $secs = $DIS % 60; // modulo
  $DIS -= $secs;
  $days = floor($DIS / (24*60*60));
  $DIS -= $days * (24*60*60);
  $hours = floor($DIS / (60*60));
  $DIS -= $hours * (60*60);
  $mins = floor($DIS / 60);
  $DIS -= $mins * 60;
  $diffstr= $days Days, $hours Hours, $mins Minutes, $secs Seconds;
  return $days;
}
- Original Message -
From: Jack Dempsey [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; PHP is not a drug.
[EMAIL PROTECTED]
Sent: Saturday, November 17, 2001 3:30 PM
Subject: RE: [PHP] Converting dates?


 search the archives there are tons of messages dealing with date
 manipulation.
 basically take the timestamps find the difference in seconds, convert to
 days, etc

 jack

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, November 17, 2001 3:17 PM
 To: PHP is not a drug.
 Subject: [PHP] Converting dates?


 I am storing a birthdate in my database as a Unix timestamp but when I
 display it I want to calculate the different between that date and todays
 date and display the persons age.

 How can I do that with PHP?

 I also want to know if it is currently their birthday.  So trying to set
 $isbday to yes if todays month and day are the same as their birthdate in
 the database.

 Jeff


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Equivilant of exit;

2001-11-16 Thread Jeff Lewis

Oh geez, do I ever feel dumb...I can NOT believe I overlooked that in the
manual :(  My apologies to the list.

Jeff
- Original Message -
From: Brian Clark [EMAIL PROTECTED]
To: PHP is not a drug. [EMAIL PROTECTED]
Sent: Friday, November 16, 2001 6:41 PM
Subject: Re: [PHP] Equivilant of exit;


 Hi Jeff,

 @ 6:26:28 PM on 11/16/2001, Jeff Lewis wrote:

  Is there an equivilant to Perls exit function?  I am calling a fatal
error
  function in PHP and I want it to end the script, just want to end the
whole
  program if this is called.

 Maybe I'm missing something, but.. :-) PHP has exit() and die(), as
 well. There are also built-in constants like __FILE__ and __LINE__

 http://www.php.net/exit
 http://www.php.net/die
 http://www.php.net/constants

 --
  -Brian Clark | PGP is spoken here: 0xE4D0C7C8
   Please, DO NOT carbon copy me on list replies.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question on variable variables

2001-11-16 Thread Jeff Lewis

I've a question regarding variable variable I was hoping someone could help me with:

All the examples in the manual have the entire variable name being variable e.g.
$a = hello   and
$$a being the same as $hello

What I need to do, however, is append a variable portion to a constant prefix.  So I 
have a set of variables that are named $MYdog, $MYcat etc. and I need to do

$a = dog
${MY$a} being the same as $MYdog

Can this be done, and if so - how? I can't get it to work.

Jeff



Re: [PHP] Question on variable variables

2001-11-16 Thread Jeff Lewis

Yes trying to get this to work:

 $curline = preg_replace(/yabb\s+(\w+)/,$$1,$curline);

So for the current line I am looking for something like yabb copyright I
want to replace that with the contents of $copyright.

Can variable variables be used in regular expressions?

Jeff
- Original Message -
From: Christopher William Wesley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Jeff Lewis [EMAIL PROTECTED]
Sent: Friday, November 16, 2001 10:38 PM
Subject: Re: [PHP] Question on variable variables


 On Fri, 16 Nov 2001, Jeff Lewis wrote:

  What I need to do, however, is append a variable portion to a constant
prefix.  So I have a set of variables that are named $MYdog, $MYcat etc. and
I need to do
 
  $a = dog
  ${MY$a} being the same as $MYdog
 
  Can this be done, and if so - how? I can't get it to work.

 So what you want is a base name with a vaiably-changing portion
 concatenated?  Gotcha!

 // you variable base name
 $myVarBase = MY;

 $a = cat;
 $something1 = This Var Likes Cats;

 $b = dog;
 $something2 = This Var Likes Dogs;

 $myVarName1 = $myVarBase . $a;
 $myVarName2 = $myVarBase . $b;

 // The same as $Mycat = This Var Likes Cats;
 ${$myVarName1} = $something1;

 // The same as $Mydog = This Var Likes Dogs;
 ${$myVarName2} = $something2;


 g.luck
 ~Chris   /\
  \ / September 11, 2001
   X  We Are All New Yorkers
  / \ rm -rf /bin/laden





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Setting variables from a text file

2001-11-14 Thread Jeff Lewis

Someone may have a better way but you can read each line (assuming the file
uses \n for a new record) and use:

arrayname = explode(|,$variable_holding_line_from_file);

Then you can do assign the variables as such:

$name = $arrayname[0]; etc

Could be a better way from the list :)

Jeff
- Original Message -
From: Rudi Ahlers [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2001 3:08 PM
Subject: [PHP] Setting variables from a text file


 Hi

 Say I have a text file, separated by | ( a pipe). Now, I want to extract
 that info, in the form of variables. I can extract and display the info in
 the text files, but that's not what I want. I want to be able to tell it
 that the first entry should be variable1, the second entry should be
 variable2, etc. I add the info into the file with a script, that always
adds
 variable1 into field one, variable2 into field2, etc. These variables are
 taken from a form. Now, I need to pass those variables onto another
script,
 but I need to be able to extract them. Can anyone help me with this
please?
 Thank you

 Rudi Ahlers



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem writing to file, can't find the error

2001-11-01 Thread Jeff Lewis

I have this code in my program but I fail to find the error, does anyone see it after 
a quick glance?


?php
if ($action == save_filter) {
$fh = fopen (./filters.data.php, r+b) or die (couldnt open);
$file = fread($fh, filesize(./filters.data.php));
$file = stripslashes($file);
$array = unserialize($file);
$array[] = array($filter, $name);

$out = serialize($array);
fwrite($fh, $out) or die;

fclose($fh);

}
?



[PHP] Logic/method question...

2001-10-22 Thread Jeff Lewis

It's not really, but kind of, a PHP question.  I mean it is being written in PHP :)

I am putting together a search feature for our classified ads and there are about 4000 
each day.  Now I am bulding a query to search by newspaper, date, and keywords.  One 
last thing is categories.

Curious how others would handle this...on the search screen (and on the site) we have 
broken down the classified codes into about 8-10 main groups (stuff like Merchandise, 
Transportation, Services etc).

Now the problem is this: in the database, each ad goes in with it's class code which 
matches up with the actual category.  So instead of just Merchandise we have sub 
categories like Christmas Trees.

There are close to 1500 class codeas and when I build this I need to allow the user to 
select just one of the 8-10 codes and have the program return everything.

Will I need to do something like:

if $selection=Merchandise then 
{
select all ads where code=2 AND code=5 AND code=123 AND code=567  etc etc
}

Jeff



[PHP] Receiving mySQL result from remote server?

2001-09-24 Thread Jeff Lewis

Is it possible to have a script at xyz.com retrieve data from a mySQL database on 
abc.com?

Jeff



Re: [PHP] Receiving mySQL result from remote server?

2001-09-24 Thread Jeff Lewis

I am assuming that all I need to change is the host/domain so that instead
of localhost it would be something else.  Am I assuming right?  So I could
have www.abc.com or the IP?

Jeff
- Original Message -
From: [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, September 24, 2001 10:52 AM
Subject: Re: [PHP] Receiving mySQL result from remote server?



 Yes, in fact it is normal.  Having dedicated MySQL box is a good idea.  A
 lot of the MySQL security is based around this.  To find out how look in
 the MySQL manual (download .pdf from www.mysql.com) or go on the mysal
 mailing list (same domain) or if you have a decent isp get primer from
 there support website (you could have a look at www.pair.com/support).

 Neb





 Jeff Lewis [EMAIL PROTECTED] on 24/09/2001 15:52:24

 Please respond to Jeff Lewis [EMAIL PROTECTED]



 To:   [EMAIL PROTECTED]
 cc:
 Subject:  [PHP] Receiving mySQL result from remote server?


 Is it possible to have a script at xyz.com retrieve data from a mySQL
 database on abc.com?

 Jeff












 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Parsing text file and dividing column into three...PLEASE help :)

2001-09-20 Thread Jeff Lewis

I have a very large text file that is set up like so:  It contains some smaller 
columns but one HUGE one that contains the body of a resume.  I am looking for help on 
processing this file.  What I need to do is convert the final column into three 
columns.  Each column can have no more than 4000 characters, is this possible?  Well I 
know it's possible but can someone help me?  I am down to my last options :(

1|||49||06|Good people skills, Management experience|||James E. RieckBRAddress: 272 
Erb St. East,BRWaterloo, Ontario N2J 1N7BRCell # 519-588-4330BRBREmployment 
HighlightsBRBR1983 to 1989 Florida Pneumatic Canada, Kitchener, OntarioBRGeneral 
Manager amp; Sales SupervisorBRBRDeveloped FP Air Tool line from start in 
Canada.BROrganized warehouse. Supervised- Shipping/ReceivingBRSold to National and 
smaller accounts.BRManufactured our own line of Air Compressors.BRNationally had 
five Sales Agents. Sales 1 million.BRBR1989 to 1996 Universal Power Canada, 
Brampton, OntarioBROperations amp; Marketing ManagerBRBRResponsible for all 
facets of business: buying, selling, marketing, national accounts, budgeting and 
bottom line. Designed and set up parts inventory amp; BRcomputer parts numbers. 
Involved with selling to Automotive, Fleet amp; Industrial distributors across 
Canada. Souced new products from Taiwan and BRJapan. Worked with Sales Reps in 
field. Designed bilingual catalogue for Air Tools. Personally secured largest chisel 
order in Canada for Hibernia- BR30.000 chisels. Nationally had 20 part-time and 3 
full-time Reps, and 5 Service people. Sales 2 million.BRBR1996 to 1999 GRG Power 
Tool Services Ltd., Milton. OntarioBRGeneral Manager amp; Co-OwnerBRBRSelling 
and repairing Air, Hydraulic, and Electric Tools toBRAutomotive, Industry and Fleet 
users.BRWholesale of Air Tools and Parts to distributors.BRMaster distributor of 
Milwaukee electric hand tools.BRCompressor Sales amp; repairs.BRBR1999 to 2000 
Al Tool Enterprises, Waterloo, OntarioBRSelf-employed / Sales 
AgentBRBRManufacture and sell Sandblast Hoods to Auto Body and Industrial 
Distributors. Sales Agent for Strikemaster Tools.BRBR2000 to 2001 DML Construction 
Supplies amp; Rentals, Waterloo,Ont. Store MnagerBRBRNew business. Responsible 
for all Sales and Purchasing.BRSales to the Construction Trade, Landscaping, 
Government etc.BRBRCurrently UnemployedBRBRValue OfferedBRBRExperience in 
selling the Universal Power Tool Line to a large number of Industrial, Automotive and 
Hardware distributors in the Toronto area.Have an BRexcellent knowledge on 
pneumatics, air compressors and electric tools.My experience has involved finding new 
products from Vendors in USA, Taiwan BRand Japan and following through with final 
sale to consumer.BRBRPersonalBRBR



Re: [PHP] Parsing text file and dividing column into three...PLEASE help :)

2001-09-20 Thread Jeff Lewis

Ok, I have written code to go through the file grabbing pretty much what I
need.  Now in the array after explode ($oldline=explode(|, $buffer);) I
need to split apart $oldline[9].  Each element should hold no more than 4000
characters.  So I will dump this all into a new array.  What would be the
best way to do this?

Jeff
- Original Message -
From: * RzE: [EMAIL PROTECTED]
To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, September 20, 2001 12:16 PM
Subject: Re: [PHP] Parsing text file and dividing column into three...PLEASE
help :)


  I have a very large text file that is set up like so:  It contains
  some smaller columns but one HUGE one that contains the body of a
  resume.  I am looking for help on processing this file.  What I
  need to do is convert the final column into three columns.  Each
  column can have no more than 4000 characters, is this possible?
  Well I know it's possible but can someone help me?  I am down to
  my last options :(

 /Original message

 Reply

 Dunno what you want to do exactly, but have you ever thought about
 split()?

 Something like: $myColumns = split (|, $contents);

 /Reply



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Can someone help me parse XML? - Challenge

2001-09-17 Thread Jeff Lewis

I have an XML file that I need to parse.  I had the base of a perl script written but 
wasn't completely functioning and was hoping someone could give me a hand with making 
it parse and do what it's supposed to but in PHP.  The perl file looked like this: 

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

$counter = 0;

open (RESUME, resumes.xml);
@resume = RESUME;
close (RESUME);

$resume = join('',@resume);

while ($resume =~ /resume(.*?)\/resume/sg) {

 $counter += 1;
 $myresume = $1;

 $myresume =~ /resumeText(.*)\/resumeText/s;
 $finalresume = $1;
 $finalresume =~ s/\s+$//g;
 $finalresume =~ s/^\s+//g;
 $finalresume =~ s/\n//g;

 $myresume =~ /resumeHolderEntry(.*?)(\/)?/s;
 $resumeholderentry = $1;
 parse($resumeholderentry,'resumeHolderEntry');

 $myresume =~ /resumeEntry(.*?)(\/)?/s;
 $resumeentry = $1;
 parse($resumeentry,'resumeEntry');

}

exit;

sub parse {

 my ($what,$header) = @_;

 $what =~ s/\n//g;
 $what =~ s/^\s+//g;
 $what =~ s/\s+$//g;
 $what =~ s/\s{2}//g;
 $what =~ s/\(.*?)\/\$1\\n/g;

 @pairs = split(/\n/, $what);
 foreach $pair (@pairs) {
  ($name,$value) = split(/=/,$pair);
  $name =~ s/^\s+//g;
  $name =~ s/\s+$//g;
  $value =~ s/\//g;
  $value =~ s/^\s+//g;
  $value =~ s/\s+$//g;

  #push(@temp, $name.'='.$value);
  push(@temp, $value);

 }

 $temp = join('|', @temp);
 if ($header eq resumeEntry) { $temp .= \|$finalresume; }
 open (FILE, $header.txt) or die Can't write to $header: $!;
 print FILE $counter\|$temp\n;
 close (FILE);
}

Now the XML file I can send someone but this is something I should have done from the 
start (use PHP) but now I am out of time and scrambling :(



  1   2   >