Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
On Fri, Oct 23, 2009 at 1:54 PM, Israel Ekpo wrote: > > > On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan > wrote: >> >> On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote: >> >> > On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan >> > wrote

Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan wrote: > On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote: > > On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan > wrote: > > > On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote: > > > > I'm looking fo

Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan wrote: > On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote: > > I'm looking for a regular expression to accomplish a specific task. > > I'm hoping someone who's really good at regex patterns can lend a quick ha

[PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
I'm looking for a regular expression to accomplish a specific task. I'm hoping someone who's really good at regex patterns can lend a quick hand. I need a regex pattern that will grab URLs out of HTML that have a certain link text. (i.e. the word "Continue") This is what I have so far but it doe

RE: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Brad Fuller
Sukhwinder Singh wrote: > Stut, thank you very much for explaining things and trying to help. > >> The applet *does* POST to PHP. However, it has the option to upload >> to an FTP server "the choice of using HTTP, HTTPS or FTP >> connections for your transfer" (from the website). > > So it se

RE: [PHP] Parse domain from URL

2007-06-08 Thread Brad Fuller
Tijnema wrote: > On 6/7/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Robin Vickery wrote: >>> In that case you can't do it just by parsing alone, you need to use >>> DNS. >>> >>> >> function get_domain ($hostname) { >>> d

RE: [PHP] Parse domain from URL

2007-06-07 Thread Brad Fuller
Robin Vickery wrote: > In that case you can't do it just by parsing alone, you need to use > DNS. > > function get_domain ($hostname) { > dns_get_record($hostname, DNS_A, $authns, $addt); return > $authns[0]['host']; } > > print get_domain("www.google.com") . "\n"; print > get_domain("googl

RE: [PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Daniel Brown wrote: > On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Hey guys, >> >> I'm faced with an interesting problem, and wondering if there's an >> easy solution. >> >> I need to strip out a domain name from a URL, and ignore

[PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Hey guys, I'm faced with an interesting problem, and wondering if there's an easy solution. I need to strip out a domain name from a URL, and ignore subdomains (like www) I can use parse_url to get the hostname. And my first thought was to take the last 2 segments of the hostname to get the doma

RE: [PHP] printing out this nested array

2007-05-14 Thread Brad Fuller
Don Don wrote: > I am having a bit of a confusion printing the values of an > array i have. When i print_r this array it contains the following: > > Array ( [ValueA] => ValueA [ValueB] => valueB [TestValue] => > TestValue [Errors] => Array ( [0] => Array ( [ErrorId] => > AD27JH [ErrorMsg] => OK )

RE: [PHP] escapeshellarg

2007-05-14 Thread Brad Fuller
Mohamed CHAARI wrote: > Hi all, > > I have to execute an external command, with an argument > (filename or directory name) given by user input (via a > form), ie something like this: > > exec('ls $_POST[...]') > > what do you think about using escapeshellarg() function in > this case ? > can I r

RE: [PHP] sorting via PHP or MySQL?

2007-05-10 Thread Brad Fuller
James Tu wrote: > (I've cross posted at the MySQL list as well) > > Here's an example with a simple table: > > describe collection; > > +--+-+--+- > +-++ >> Field| Type| Null | Key | > Def

RE: [PHP] Disable Soap Client and Soap Server in php5

2007-05-09 Thread Brad Fuller
Don Don wrote: > How can i disable soap client and server for php5, reason is > that i've got NuSOAP (which i must use) and its classes clash > with that of PHP5. My php configuration (when using > displays soap client and server enabled for php5. > I need to disable if ..amd looking into the co

RE: [PHP] sqlite AND OR query ?

2007-05-09 Thread Brad Fuller
[EMAIL PROTECTED] wrote: > Hello, > > I want to select two dates one being todays date and the > other being -00-00 which just a date in the database when > no proper date has been entered. > > Ive tried this but it does not work... > > $today = date('Y-m-d'); > $result = sqlite_query($db, "

RE: [PHP] cURL: multipart/form-data POST request with empty file part

2007-05-04 Thread Brad Fuller
Emmanuel Raulo-Kumagai wrote: > Sent: Friday, May 04, 2007 8:44 AM > To: php-general@lists.php.net > Subject: [PHP] cURL: multipart/form-data POST request with > empty file part > > Hello > > I'm writting a client in PHP for some CMS. > I need to send an HTTP POST request with a > multipart/for

RE: [PHP] MySQL change-tracking

2007-05-02 Thread Brad Fuller
Richard Lynch wrote: > I have this simple database and I'm going to have a handful > of people editing it... > > I'd like to track each and every edit with username, and, > ideally, provide myself an easy "Undo" if I decide [bleep] is > an idiot and shouldn't have done that. > > Now, I'm not real

RE: [PHP] INSERT Array Values into mySQL Table

2007-05-02 Thread Brad Fuller
Jim Moseby wrote: >> $sql = "INSERT INTO table (f1, f2, f3, ". implode(",", >>array_keys($pr1)) .") VALUES ('abc', '123', '456', ". implode(",", >> array_values($pr1)) >> .")"; >> >> HTH, >> >> Brad > > > Might not work if the array values need to be enclosed in > quotes. I would build

RE: [PHP] INSERT Array Values into mySQL Table

2007-05-02 Thread Brad Fuller
Rahul S. Johari wrote: > Ave, > > Here¹s the thing, I¹ve got an Array which has it¹s own set of > Keys => Values. I¹m using foreach() to read the Keys => Values like > this: > > function pr1($var) { > foreach ($var as $k => $v) { > echo ³$k => $v²; > } >

RE: [PHP] exec() and redirect output of program [SOLVED]

2007-05-01 Thread Brad Fuller
Tijnema ! wrote: > On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Brad Fuller wrote: >>> Daniel Brown wrote: >>>> This way just lets it do it's own thing, with no output, and >>>> PHP won't hang. It'll continue from the CLI

RE: [PHP] exec() and redirect output of program

2007-05-01 Thread Brad Fuller
Brad Fuller wrote: > Daniel Brown wrote: >> This way just lets it do it's own thing, with no output, and PHP >> won't hang. It'll continue from the CLI after the HTTP session is >> over. >> >> > exec('php test.php > /dev/null 2>

RE: [PHP] exec() and redirect output of program

2007-05-01 Thread Brad Fuller
Daniel Brown wrote: > This way just lets it do it's own thing, with no output, > and PHP won't hang. It'll continue from the CLI after the HTTP > session is over. > > exec('php test.php > /dev/null 2>&1 &'); ?> > > > On

RE: [PHP] link on user uploaded pic

2007-03-29 Thread Brad Fuller
> -Original Message- > From: Brad Fuller [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 29, 2007 1:24 PM > To: 'Tana'; php-general@lists.php.net > Subject: RE: [PHP] link on user uploaded pic > > > -Original Message- > > From: Tana [mai

RE: [PHP] link on user uploaded pic

2007-03-29 Thread Brad Fuller
> -Original Message- > From: Tana [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 29, 2007 1:02 PM > To: php-general@lists.php.net > Subject: [PHP] link on user uploaded pic > > Hi > > which is the best way to change this code > > > > to > >src="images/user_upload/akarmi.jpg">

RE: [PHP] IP Geolocation Scripts

2007-03-29 Thread Brad Fuller
> -Original Message- > From: Daniel Brown [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 29, 2007 12:08 PM > To: php-general@lists.php.net > Subject: [PHP] IP Geolocation Scripts > > Does anyone have any recommendations for existing open source PHP > scripts that use IP Geolocation?

RE: [PHP] Date/time format?

2007-03-28 Thread Brad Fuller
Jason wrote: > Hi Everyone, > > First off, I'm using PHP 5.2.0 and apache 1.3.33 > > I am trying to figure out what format a string is in in a database. > It's a timecard system that I have found on-line and I am attempting > to figure out how to write a script that would give me everyones > time

RE: [PHP] My own "captcha" from 2 years ago......

2007-03-26 Thread Brad Fuller
> From: tedd [mailto:[EMAIL PROTECTED] > At 10:59 AM -0400 3/26/07, Brad Fuller wrote: > > > >echo ''; > > > >This does not "run" or "call" image.php. > > > >This line of code sends this output to the browser. >

RE: [PHP] My own "captcha" from 2 years ago......

2007-03-26 Thread Brad Fuller
> > -Original Message- > > From: tedd [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 26, 2007 8:49 AM > > To: php-general@lists.php.net > > Subject: RE: [PHP] My own "captcha" from 2 years ago.. > > > > At 10:02 PM -0400 3/25/07, Jake McHenry wrote: > > >Like I said... Even if they h

RE: [PHP] Amazon AWS + SimpleXML

2007-03-23 Thread Brad Fuller
> -Original Message- > From: Myron Turner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 20, 2007 10:24 AM > To: Brad Fuller > Cc: php-general@lists.php.net > Subject: Re: [PHP] Amazon AWS + SimpleXML > > Brad Fuller wrote: > > Hey guys, > > > &

RE: [PHP] Add New Records Only!

2007-03-23 Thread Brad Fuller
Rahul wrote: > Ave, > > It's definitely not live data, so that is not a problem at all. But I'm > not > sure I understand your method very well. > > I do understand getting data from both the existing DBF and the multiple > mySQL tables into a temporary mySQL table. But if I do go ahead and do >

[PHP] Amazon AWS + SimpleXML

2007-03-19 Thread Brad Fuller
Hey guys, I'm having trouble trying to parse XML results from an Alexa Web information service from amazon.com, using SimpleXML. Here is an example response: http://alexa.amazonaws.com/doc/2005-10-05/";>http://awis.amazonaws.com/doc/2005-07-11";>< aws:RequestId>cdfcc49c-5c01-4fc1-87e4-06f2f151e

RE: [PHP] Can't get PHP errors to display or log consistently

2007-03-19 Thread Brad Fuller
> -Original Message- > From: Chris W. Parker [mailto:[EMAIL PROTECTED] > Sent: Monday, March 19, 2007 1:57 PM > Cc: php-general@lists.php.net > Subject: RE: [PHP] Can't get PHP errors to display or log consistently > > On Friday, March 16, 2007 4:04 PM Robert Cummings >

RE: [PHP] Running PHP on a windows server-your views

2007-03-19 Thread Brad Fuller
> Im assuming it will be running IIS. (shudder) > The site is very important and any issues will hamper the functionality > and accessibility of the site. LOL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] $_POST array order

2007-03-14 Thread Brad Fuller
> -Original Message- > From: Tim [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 14, 2007 12:58 PM > To: 'PHP' > Subject: [PHP] $_POST array order > > Hi, > > Quick question regarding $_POST array element order, first the situation: > > I am submitting a form with x first fields and t

RE: [PHP] mail

2007-03-13 Thread Brad Fuller
> -Original Message- > From: Dani Dws [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 13, 2007 2:35 PM > To: php-general@lists.php.net > Subject: [PHP] mail > > I just want to know if the mail function works from a localhost (local > server)? > > I've checked my php.ini all the setting a

RE: [PHP] dst and strtotime

2007-03-13 Thread Brad Fuller
Jake McHenry wrote: > Why would one give me EST and the other EDT? Because EDT did not kick in until 2 or 3 AM on 3/11. PHP is compensating for DST by subtracting 1 hour, because php sees "last sunday" as 12:00 AM on 3/11. Subtract 1 hour and you get 11:00 PM on 3/10. > +60*60 worked after strt

RE: [PHP] dst and strtotime

2007-03-13 Thread Brad Fuller
> -Original Message- > From: Jake McHenry [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 13, 2007 11:22 AM > To: For users of Fedora; PHP-General > Subject: Re: [PHP] dst and strtotime > > A little more info: > > strtotime("last monday") or yesterday, is correct, but > strtotime("l

RE: [PHP] Extract url from string [SOLVED]

2007-03-12 Thread Brad Fuller
On 3/12/07, Brad Fuller <[EMAIL PROTECTED]> wrote: > I tried this: > > preg_match("/http(s)?:\/\/(*.?)\s/", $stringUrl, $matches) > > But my pattern syntax is messed up cuz I get this error: > > Warning: preg_match() [function.preg-match]: Compi

RE: [PHP] Extract url from string

2007-03-12 Thread Brad Fuller
> -Original Message- > From: Tijnema ! [mailto:[EMAIL PROTECTED] > Sent: Monday, March 12, 2007 1:10 PM > To: Brad Fuller > Cc: php-general@lists.php.net > Subject: Re: [PHP] Extract url from string > > On 3/12/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >

RE: [PHP] php and javascript error

2007-03-07 Thread Brad Fuller
> -Original Message- > From: Brad Fuller [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 07, 2007 12:02 PM > To: 'Ed Curtis'; 'php-general@lists.php.net' > Subject: RE: [PHP] php and javascript error > > > -Original Message-

RE: [PHP] php and javascript error

2007-03-07 Thread Brad Fuller
> -Original Message- > From: Ed Curtis [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 07, 2007 11:47 AM > To: php-general@lists.php.net > Subject: Re: [PHP] php and javascript error > > > >>> > >>> > >>>This produces an "Error on Page" in IE 7, but works perfectly in > Firefox > >>>an

RE: [PHP] Launch a seperate process

2007-03-06 Thread Brad Fuller
tyvm, I will check it out right away! B > -Original Message- > From: fedt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 06, 2007 5:17 PM > To: Brad Fuller > Cc: php-general@lists.php.net > Subject: Re: [PHP] Launch a seperate process > > pcntl_ fork() and pcn

RE: [PHP] Getting Similar rows from db

2007-02-23 Thread Brad Fuller
> -Original Message- > From: Jay Blanchard [mailto:[EMAIL PROTECTED] > Sent: Friday, February 23, 2007 1:51 PM > To: Wikus Möller; php-general@lists.php.net > Subject: RE: [PHP] Getting Similar rows from db > > [snip] > I need a script that selects all similar rows from a database. Like >

RE: [PHP] Understanding session variables with input field and register_global

2007-02-20 Thread Brad Fuller
> -Original Message- > From: Otto Wyss [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 20, 2007 11:32 AM > To: php-general@lists.php.net > Subject: [PHP] Understanding session variables with input field and > register_global > > I've an input field in a form > > > and with register_

RE: [PHP] WHERE problem

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Mike Shanley [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 3:50 PM > Cc: php-general@lists.php.net > Subject: Re: [PHP] WHERE problem > > Without the single-quotes, I still get nothing returned. > > Bruce Cowin wrote: > > Are you getting an error

RE: [PHP] Month

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 2:08 PM > To: Brad Fuller > Cc: Jay Blanchard; php-general > Subject: Re: [PHP] Month > > Okay, when I try the sprintf I get the following error when I

RE: [PHP] Month

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 1:44 PM > To: Jay Blanchard > Cc: php-general > Subject: Re: [PHP] Month > > Okay, so sprintf("%02s", $m) means that the value of $m would be checked > for > the amount of digits returned.

RE: [PHP] Month

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 1:27 PM > To: php-general > Subject: [PHP] Month > > Greetings, > > I have the following code which populates a dropdown box so a user can > select a month. They see the month name and the

RE: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Brad Fuller
> -Original Message- > From: Brad Fuller [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 15, 2007 3:48 PM > To: 'Terra Frost'; 'Peter Lauri' > Cc: php-general@lists.php.net > Subject: RE: [PHP] plugging gmmktime value into gmdate yields incorre

RE: [PHP] Session Problem

2007-02-15 Thread Brad Fuller
> -Original Message- > From: LoneWolf [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 15, 2007 4:35 PM > To: php-general@lists.php.net > Subject: [PHP] Session Problem > > I am having a problem where it appears that the session is not being saved > properly. > > While on a page, I ca

RE: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Brad Fuller
> -Original Message- > From: Terra Frost [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 15, 2007 3:20 PM > To: Peter Lauri > Cc: php-general@lists.php.net > Subject: Re: [PHP] plugging gmmktime value into gmdate yields incorrect > date > > date('Z') on the server producing the incorr

RE: [PHP] Retrieve value of newly inserted row.

2007-02-15 Thread Brad Fuller
plays the echo of my query and > returns the echo of "Insert Complete" > > HOWEVER, when I go to look at the data base there is NO data inserted into > table2 even though my query returned that "Insert Complete" statement. > > Any ideas? > > > >

RE: [PHP]Password and FTP Folder

2007-02-15 Thread Brad Fuller
> -Original Message- > From: Helder Lopes [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 15, 2007 5:32 AM > To: php-general@lists.php.net > Subject: [PHP]Password and FTP Folder > > Hi people > > hi have a problem > > i need a script for make a ftp folder that have a password for e

RE: [PHP] Getting mysql_query results into an array

2007-02-14 Thread Brad Fuller
> > How about scenario #3: I wish to output my data in (for example) > > three columns, as a phone book does. To make the example simple, > > assume 15 data points. I wish the output to look like > > > > 1 611 > > 2 712 > > 3 813 > > 4 914 > >

RE: [PHP] Retrieve value of newly inserted row.

2007-02-14 Thread Brad Fuller
> >From looking on the web (MSDN) I found the @@identity and the explanation > of > what it is, but MS's "example" is horrible and does not show a good > context > for using this function. Could you elaborate more on its use? $q = mssql_query("INSERT INTO TableName(...) VALUES(...) SELECT LAST_IN

RE: [PHP] Banner rotation with links

2007-02-14 Thread Brad Fuller
> -Original Message- > From: Németh Zoltán [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 14, 2007 11:37 AM > To: Chris Carter > Cc: php-general@lists.php.net > Subject: Re: [PHP] Banner rotation with links > > 2007. 02. 14, szerda keltezéssel 08.29-kor Chris Carter ezt írta: > > Ho

RE: [PHP] Redisplay file name on failed upload

2007-02-13 Thread Brad Fuller
> Is it possible to assign form[ upldFile ] = "C:\somepath\somefile" > or > form[ upldFile ] = $_FILES['userfile']['name'] The "value" attribute of the tag is not able to be altered or pre-populated for obvious security reasons. > The script which does the validation is the same one which conta

RE: [PHP] what do i need to disable

2007-02-08 Thread Brad Fuller
> -Original Message- > From: Don [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 08, 2007 3:28 PM > To: php-general@lists.php.net > Subject: RE: [PHP] what do i need to disable > > > I asked this question awhile ago and never really visited the issue till > now. The response I got sh

RE: [PHP] Javascript and $_POST

2007-02-07 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 07, 2007 4:35 PM > To: php-general > Subject: [PHP] Javascript and $_POST > > I have a form that uses Javascript to validate form field entries, and if > they are incorrect it returns an error to

RE: [PHP] base64-encoding in cookies?

2007-02-07 Thread Brad Fuller
> -Original Message- > From: Fletcher Mattox [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 07, 2007 2:49 PM > To: php-general@lists.php.net > Subject: Re: [PHP] base64-encoding in cookies? > > I wrote: > > > A campus web server (not under my control) returns an authentication > >

RE: [PHP] Conditional Select

2007-01-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Friday, January 19, 2007 3:10 PM > To: php-general@lists.php.net > Subject: [PHP] Conditional Select > > I have a page that shows all outstanding tickets, what I'm > trying to have it do is let users search by sev

RE: [PHP] dynamic lists

2007-01-17 Thread Brad Fuller
> -Original Message- > From: Jay Blanchard [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 17, 2007 4:05 PM > To: Don; php-general@lists.php.net > Subject: RE: [PHP] dynamic lists > > [snip] > By dynamic drop list I mean the type where the options > contained in the subsequent list

RE: [PHP] what mail program I'm using?

2007-01-12 Thread Brad Fuller
[EMAIL PROTECTED] wrote: > hi, > a moth ago we (company I work for) moved to new hosting > company. we have dedicated sles10/php5/mysq5/apache2 based server. > before, sending confirmation emails to clients using mail() > functin was working fine. now, many of emails we send don't > reach to receiv

RE: [PHP] storing date in datetime column

2007-01-09 Thread Brad Fuller
[EMAIL PROTECTED] wrote: > hi, > $date = "January 8 2007 11:23 pm"; > and have to store it on db in datetime column as -mm-dd HH:ii:ss. > Is there any function that will "translate" $date in format I > need to store it in DB? > > Right now I was thinking to do like this: > > $date_new = explo

RE: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Brad Fuller
> -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Monday, December 18, 2006 3:39 AM > To: Beauford > Cc: PHP > Subject: Re: [PHP] Clearing POST variable on page refresh > > Beauford wrote: > > Hi, > > > > I have a page with a form on it which posts to itself. The p

RE: [PHP] Having problem sending XML over HTTP

2006-12-14 Thread Brad Fuller
> -Original Message- > From: Nauman Akbar [mailto:[EMAIL PROTECTED] On Behalf Of Nauman > Akbar > Sent: Thursday, December 14, 2006 3:32 PM > To: php-general@lists.php.net > Subject: [PHP] Having problem sending XML over HTTP > > Hello! > > > > I picked up an example from Curl section o

RE: [PHP] php redirection..

2006-12-14 Thread Brad Fuller
> -Original Message- > From: bruce [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 14, 2006 12:08 PM > To: 'Brad Fuller'; 'PHP General List' > Subject: RE: [PHP] php redirection.. > > all these are solid posts... > > however, the or

RE: [PHP] php redirection..

2006-12-14 Thread Brad Fuller
Better to do this on the client side with JS Redirect Test function redirect() { location.href='http://www.google.com/'; } You will be redirected in 3 seconds... > -Original Message- > From: Youri LACAN-BARTLEY [mailto

RE: [PHP] flash/php file uploader

2006-12-11 Thread Brad Fuller
> -Original Message- > > Hi > > Sorry if this is considered off topic, but do you know of any code > examples/libs with a flash/php file uploader with progress bar? > > I've googled for a while but the scripts I find won't work. I'm using > Firefox 2 and Flash player 9 on an intel Mac if

RE: [PHP] Need help with RegEx

2006-12-11 Thread Brad Fuller
I got it. Hello, World!"; preg_match("#(.*?)#s", $input, $matches); echo $matches[1]; ?> > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, December 11, 2006 10:59 AM > To: php-general@lists.php.net > Cc: [EMAIL PROTECTED] > Subject

RE: [PHP] Need help with RegEx

2006-12-11 Thread Brad Fuller
The example provided didn't work for me. It gave me the same string without anything modified. I am also looking for this solution to strip out text from some XML response I get from posting data to a remote server. I can do it using substring functions but I'd like something more compact and p

RE: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Brad Fuller
> How can I ensure that a variable contains a postive integer number? > I'm currently using this code: > > $number=(1-$number); > $number=(1-$number); > if ( $number<1 ) { $number=1; } > > But I'm sure that there is a better way. What would that be? this will check that $input is a posi

RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Brad Fuller
> -Original Message- > From: Richard Morris [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 06, 2006 10:22 AM > To: php-general@lists.php.net > Subject: [PHP] PHP5 Inheritance/method override problem > > Hi, > > I came across this problem and I was wondering if someone might be able

RE: [PHP] Maybe an HTML prob?

2006-11-29 Thread Brad Fuller
if ($Permission = "Yes") should be if ($Permission == "Yes") It's one of those elusive little oversights we've all come across in our time. :) -B > -Original Message- > From: Frank Reichenbacher, Bio-Concepts, Inc. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 29, 2006 1:53 PM

RE: [PHP] backing up a database

2006-11-28 Thread Brad Fuller
> -Original Message- > From: James Tu [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 28, 2006 1:21 PM > To: PHP General List > Subject: Re: [PHP] backing up a database > > Does one need to lock(?) MySQL before running mysqldump? > Or will the mysqldump command wait for any pending ope

RE: [PHP] Programmatic POST

2006-11-22 Thread Brad Fuller
> -Original Message- > From: Gabe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 22, 2006 3:08 PM > To: php-general@lists.php.net > Subject: [PHP] Programmatic POST > > I'm looking to write a function that will receive the contents of a web > form, do some data manipulation, then pa

RE: [PHP] backing up a database

2006-11-22 Thread Brad Fuller
Here is a script that I found that has been working well for me. I set up a cron job to run this file every night just after midnight. It e-mails a gzipped sql dump file as an attachment to the specified e-mail address. Right now the database this is backing up is not very big. I'm not sure how

RE: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Brad Fuller
> > Logic dictates that if something evaluates to NOT FALSE it > > must be TRUE. In a situation where you are only dealing with boolean values, that above statement would be correct. In this case it is not. int stripos ( string haystack, string needle [, int offset] ) What you are missi

RE: [PHP] Excel problem

2006-11-16 Thread Brad Fuller
You could also name the file *.csv and use a comma as a delimiter instead. Don't forget to put quotes around any data that may have tab characters in it. (Or commas if you're using csv) Hope that helps -B > -Original Message- > From: amit hetawal [mailto:[EMAIL PROTECTED] > Sent: Th

RE: [PHP] file_get_contents

2006-11-16 Thread Brad Fuller
hp";); $nstart = strpos($code, ''); $nstop = strpos($code, ''); echo "" . substr($code, $nstart, $nstop-$nstart) . ""; ?> > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 16, 2006 11:12

RE: [PHP] file_get_contents

2006-11-16 Thread Brad Fuller
Use curl or fopen() to make a request to that PHP page, instead of reading in the actual contents of the file. Example: http://blabla.com/player.php'; $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 120); c

RE: [PHP] Checking file existence

2006-11-15 Thread Brad Fuller
$hour = date("H", strtotime("-$i minutes")); $hhmm = date("Hi", strtotime("-$i minutes")); $filename = "file.$hhmm.jpg"; if(file_exists("/path/to/$year/$month/$day/$hour/$filename")) { $img_array

RE: [PHP] Checking file existence

2006-11-15 Thread Brad Fuller
$img_array = array(); $i = 0; while(count($img_array) < 5) { $hhmm = date("Hi", strtotime("-$i minutes")); $filename = "file.$hhmm.jpg"; if(file_exists("/path/to/$filename")) { $img_array[] = $filename; } $i++; } print_r($img_ar

RE: [PHP] date() function

2006-11-14 Thread Brad Fuller
$prevminute = sprintf('%02s', date("i")-1); > -Original Message- > From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 14, 2006 1:17 PM > To: PHP General List > Subject: [PHP] date() function > > > I noticed that if I do something like this: > > $pre

RE: [PHP] path

2006-11-10 Thread Brad Fuller
> -Original Message- > From: Alain Roger [mailto:[EMAIL PROTECTED] > Sent: Friday, November 10, 2006 1:48 PM > To: PHP General List > Subject: [PHP] path > > Hi, > > How can i get the path in which a PHP file is running ? > > for example, user clicking on a link opened page "action.php"

RE: [PHP] Delivery failed

2006-11-08 Thread Brad Fuller
Did everyone on the list get this message? > Dear user php-general@lists.php.net, > > We have found that your e-mail account was used to send a large amount of > junk email messages during the last week. > Obviously, your computer was infected by a recent virus and now contains a > hidden pro

RE: [PHP] Spam using email on website

2006-11-07 Thread Brad Fuller
> -Original Message- > From: Pieter du Toit [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 07, 2006 1:43 AM > To: php-general@lists.php.net > Subject: [PHP] Spam using email on website > > Hi guys > > I have a website that is being crawled or whatever and i have a submission > form f

RE: [PHP] Spam using email on website

2006-11-07 Thread Brad Fuller
> -Original Message- > From: Pieter du Toit [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 07, 2006 1:43 AM > To: php-general@lists.php.net > Subject: [PHP] Spam using email on website > > Hi guys > > I have a website that is being crawled or whatever and i have a submission > form f

RE: [PHP] counting records in db

2006-10-26 Thread Brad Fuller
> Would it be ok to use the same code to check if customer is loged in? > > $query = mysql_query(" >SELECT COUNT(Username) as NoOfRecords >FROM customers >WHERE Username = '$Username' AND Password = '$Password'"); > if (mysql_result($query, 0) == 0)

RE: [PHP] PHP Template Trouble

2006-10-26 Thread Brad Fuller
ple mapped to www.example.com > > and > > example2 mapped to www.example2.com > > example's root dir would be along the lines of: > c:\inetpub\www\example\htdocs > > example2's root dir would be c:\inetput\www\example2\htdocs > > Example2 cannot access th

RE: [PHP] PHP Template Trouble

2006-10-26 Thread Brad Fuller
26, 2006 10:15 AM To: php-general@lists.php.net Subject: Re: [PHP] PHP Template Trouble Yes all the sites are located on a Windows 2003 Dedicated Server. Kevin Brad Fuller wrote: > Kevin, > > Are all these sites hosted on the same box? > > -Brad > > > > -Original

RE: [PHP] PHP Template Trouble

2006-10-26 Thread Brad Fuller
that would need to be posted through correctly, even if using frames on www.example1.com (using them to load www.solution.com) $_SERVER[HTTP_HOST] would still equal www.example1.com Thanks Kevin Brad Fuller wrote: >>> Hi, >>> >>> I am trying to have 1 template site and

RE: [PHP] PHP Template Trouble

2006-10-26 Thread Brad Fuller
>> Hi, >> >> I am trying to have 1 template site and have an unlimited number of >> websites using this template site to call there own information. >> >> The sites are exactly the same except for the database, each of the >> sites also needs there own URL, for example one of these urls may be >

RE: [PHP] Disable all caching

2006-10-10 Thread Brad Fuller
> I have a php (ver 4.x) script that is being cached. > I have placed: > > but the page is still being cached. I'm not sure if its apache or the > php. How can I disable all caching? > is there something I can set in php.ini? > > (Mac OS X Server) > > Thanks > > Ben > > -- > PHP General Maili

RE: [PHP] changing the global variables (_SERVER[HTTP_USER_AGENT])

2006-10-03 Thread Brad Fuller
You can use cURL to send a request and you can set the user agent to whatever you want. http://www.php.net/curl See function: "curl_setopt" and option: "CURLOPT_USERAGENT" -Brad -Original Message- From: Balaji A [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 2:05 PM To: [EM

RE: [PHP] Strange error in PHP/MySQL

2006-10-02 Thread Brad Fuller
> if (mysql_query($sqlInsertUser, $conn)) > $messagesqlInsertUser = 'Success...'; > else > $messagesqlInsertUser = 'Error: ' . mysql_error(); > $result = mysql_query($sqlInsertUser); I see this being executed twice. -> mysql_query($sqlInsertUser); I believe that is your problem. Chang

RE: [PHP] readdir

2006-09-15 Thread Brad Fuller
According to php.net, the readdir() function simply reads the contents of the directory in the order which they are stored by the filesystem. One way to force the order would be to loop through the contents of the directory and store the directory names into an array, and use the functions filemti

RE: [PHP] Session issues

2006-09-15 Thread Brad Fuller
Is this only happening when the user clicks the "back" button in the browser? I recently had a similar problem with IE caching pages even when the header is set to (supposedly) prevent caching. Apparently there is a bug with IE which requires a specific workaround. The fields are pre-filled with

RE: [PHP] security include from remote server

2006-09-14 Thread Brad Fuller
Miguel - > If my solution is not viable, is there any other way of hosting my > files someplace else, but still access the local database? Yes. Your remotely hosted code would call the database on your local server. Something like: You would also need to allow the connection from the rem