Re: [PHP] PHP access of FileMaker data

2007-11-15 Thread Brian Dunning
Paul - a PHP API is built into the current version of FileMaker Server. You do not need any third party classes or anything else. Some info: http://www.filemaker.com/support/technologies/php.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Recommendation for an XML class?

2008-02-06 Thread Brian Dunning
I see there are billions of XML classes out there. Can anyone recommend one that's good simple? My needs are quite basic, all I really need is to draw simple values out of the XML, like convert order_no123/order_no to $order_no = 123. Thanks... -- PHP General Mailing List

[PHP] Sending XML to MSIE7

2008-02-14 Thread Brian Dunning
Does anyone know if there's a way to send XML to MSIE7 and avoid having MSIE mangle the XML with CSS to display it pleasantly as HTML? I'm building a PHP web service that returns XML to a desktop app that uses the MSIE7 toolbox, and so it is not able to interpret the XML due to this

Re: [PHP] Sending XML to MSIE7

2008-02-15 Thread Brian Dunning
PM, Per Jessen wrote: Brian Dunning wrote: Does anyone know if there's a way to send XML to MSIE7 and avoid having MSIE mangle the XML with CSS to display it pleasantly as HTML? Isn't it enough to send it with Content-Type: application/octet- stream ? -- PHP General Mailing List (http

[PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Brian Dunning
Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the Scheduled Tasks log says that it exited with an (ff). So I entered the above

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Brian Dunning
Adding this command solved it. Thanks to everyone! I did not even know this command existed. On Feb 27, 2008, at 3:46 PM, Andrés Robinet wrote: Use the -c command line option to be sure, for example: C:\php5\php.exe -c C:\php5\php.ini -f D:\wamp\www\scriptname.php -- -- PHP General

[PHP] OK to have many files in one folder?

2007-06-15 Thread Brian Dunning
Server is running Linux, and PHP is constantly creating and modifying images in a directory. Apache is constantly serving these same images. There are about 250,000 of them in the same directory. Seems to be running OK, no problematic CPU load, but I'm wondering if anyone knows whether I'm

Re: [PHP] Cannot un-subscribe from list

2007-06-15 Thread Brian Dunning
On 6/15/07, Mark Smith [EMAIL PROTECTED] wrote: I am currently trying to unsubscribe from this mailing list, however I am nor very successful in doing this. The mailer program will refuse to accept my address for removal, it will simply continue to send mail to my address. Why is this

Re: [PHP] OK to have many files in one folder?

2007-06-15 Thread Brian Dunning
Thanks for the replies but I'm not sure I know what to do with them. Is the problem with the number of files, or is the problem with the activity? Can you dumb down your answers at all for me? :) On Jun 15, 2007, at 11:51 AM, Daniel Brown wrote: 6/15/07, Jay Blanchard [EMAIL PROTECTED]

Re: [PHP] OK to have many files in one folder?

2007-06-15 Thread Brian Dunning
I can easily break it up into 100 subdirectories, 2500 files in each, would that be good insurance against problems? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] unlink before imagepng?

2007-06-17 Thread Brian Dunning
If I write an edited image back to disk using imagepng, is it desirable to first unlink the existing image? I notice that it works fine if I don't. Just wondering if there are any pros or cons. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] OK to have many files in one folder?

2007-06-17 Thread Brian Dunning
For everyone who advised me to beware the inode, allow me to forward what the Rackspace admins told me. This is Greek to me, and I'm hoping one of you can translate. All I understood was where he said I appear to have more than enough. Yes? ---snip--- All of your slices on the disk are

Re: [PHP] unlink before imagepng?

2007-06-20 Thread Brian Dunning
Can do, but I would be calling clearstatcache() very often, many times per second, as often as these graphics are being edited. Would that still be appropriate for the server? On Jun 19, 2007, at 8:07 AM, Greg Donald wrote: On 6/17/07, Brian Dunning [EMAIL PROTECTED] wrote: If I write

[PHP] SMS questions

2007-07-12 Thread Brian Dunning
Hi all - I've been looking at a number of the commercial service providers for bulk SMS messaging, most of whom have PHP APIs. But since they are selling something they don't answer my question Is there any (legal, legitimate) way to send an SMS message that can be replied to the

Re: [PHP] SMS questions

2007-07-12 Thread Brian Dunning
Here's another thing that would be nice: A web service to look up the carrier for a cell number. That way you could simply send an email to [EMAIL PROTECTED], though this would still be only a partial solution. This is a lot harder now that numbers are transportable between carriers. I

[PHP] Empty super globals

2007-08-07 Thread Brian Dunning
A friends asked me the following and I have no clue: There are variables in php called the super globals. Specifically the $_SERVER super globals are coming back as an empty array. The shopping cart that pixami supplied to us requires the $_SERVER super globals. -- PHP General Mailing List

[PHP] Super bizarre changing variable!!

2007-10-04 Thread Brian Dunning
I'm running the following code: $query3 = DELETE FROM table1 WHERE referer=$referer ORDER BY creation LIMIT $numtodelete; $result3 = mysql_query($query3); $string = $total found, $n kept, $numtodelete extras removed ($query3); $x = mysql_query(insert into table2 (friend_id,data) values

Re: [PHP] Re: Super bizarre changing variable!!

2007-10-04 Thread Brian Dunning
. On Oct 4, 2007, at 9:10 AM, Colin Guthrie wrote: Brian Dunning wrote: I'm running the following code: $query3 = DELETE FROM table1 WHERE referer=$referer ORDER BY creation LIMIT $numtodelete; $result3 = mysql_query($query3); $string = $total found, $n kept, $numtodelete extras removed

Re: [PHP] Super bizarre changing variable!!

2007-10-05 Thread Brian Dunning
This is indeed the complete code, I did not cut anything out for brevity, which is why this appears to be so impossible. eAccelerator is activated, could something be corrupt? Could a corrupt index cause this? In table1, `referer` is int(12). In table2, `data` is text In table2,

Re: Re[2]: [PHP] Super bizarre changing variable!!

2007-10-05 Thread Brian Dunning
I definitely misunderstood what you guys are saying about the length. That's clearly a problem for a lot of my values. I can switch them both to bigint. One table has 34,000,000 records and it's OK if this is hung up for a few minutes but not much longer than that - any chance this change

[PHP] Editing an element within an array

2007-10-10 Thread Brian Dunning
I have a two-dimensional array that looks like this: array( array(0, 123), array(0, 234), array(0, 345), array(0, 456) ) I want to REMOVE any element that contains 234, and I want to INCREMENT the first value for any element that contains 345, to make it look

[PHP] Strip non-alphanumerics from beginning and end?

2006-08-04 Thread Brian Dunning
Is there a command to strip all non-alphanumerics form the beginning and end of a string? Ex.: '^%kj.h,kj..*(' becomes 'kj.h,kj' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strip non-alphanumerics from beginning and end?

2006-08-08 Thread Brian Dunning
Perfect, thanks very much. I think I'll probably die before I'm ever handy with regex. On Aug 4, 2006, at 7:57 PM, Robert Cummings wrote: On Fri, 2006-08-04 at 19:12 -0700, Brian Dunning wrote: Is there a command to strip all non-alphanumerics form the beginning and end of a string? Ex

[PHP] Getting an argument out of a web page

2006-09-11 Thread Brian Dunning
I'm trying to read a MySpace FriendID out of a web page. If you view the source, you see this is multiple places: .friendID=12345 What's the simplest way to extract the FriendID and stick it in a variable? Is there a regex that would do this? -- PHP General Mailing List

[PHP] Really stupid cookie question

2006-09-11 Thread Brian Dunning
I am embarrassed to ask this. If I set a cookie for 30 days, and the visitor comes back 25 days later but I do nothing to re-set the cookie, will his cookie expire in 5 days, or does his browser automatically reset it to another 30 days? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Getting an argument out of a web page

2006-09-11 Thread Brian Dunning
That did it, thanks! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is SOAP not really enabled?

2006-09-11 Thread Brian Dunning
The techs at Rackspace just enabled SOAP for me. I have a command: $soap = new SoapClient('http://geocoder.us/dist/eg/clients/ GeoCoderPHP.wsdl'); which works fine on my PHP 5.1.6 development server, but it won't run on my 4.3.9 server at Rackspace. The only place 'soap' appears in

[PHP] Going from PHP4 to PHP5

2006-09-12 Thread Brian Dunning
I'm considering upping my production server from 4 to 5. There are too many sites to test everything in 5 first. Is there a good source I can go to to find out what kinds of problems to expect? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] [OFF] PHP/MySQL contractor needed

2006-09-22 Thread Brian Dunning
We need a guy for some hourly PHP/MySQL work. Large project to start with, plenty of incremental stuff down the road. Looking for someone expert, with a flexible schedule who can make hours available when we need them. Your regular hourly rate. Also - only interested in someone local to

[PHP] How to output an MP3 file?

2006-11-15 Thread Brian Dunning
I'm trying to route all my MP3 requests through a brief PHP script to log the downloads to a database, and then I want to output the MP3 exactly as if the browser had requested it normally. So far I haven't found headers that will serve it normally; it either wants to download it as an

Re: [PHP] How to output an MP3 file?

2006-11-15 Thread Brian Dunning
Thanks Jon - You put me on the right track. Apparently audio/x-mp3 is what iTunes wants to see, and it seems to work with browsers. :) On Nov 15, 2006, at 10:06 AM, Jon Anderson wrote: Brian Dunning wrote: header('Content-Type: application/octet-stream'); snip What should I change

[PHP] Serving out a file to Firefox ... headers?

2006-11-23 Thread Brian Dunning
Sorry to revisit this issue YET ONE MORE TIME... :) :) My online store sends out the file for download upon purchase. Below are the headers I send, and I understood that it should work for all browsers. It does not work for Firefox. Suggestions? header('Content-Type:

[PHP] ?=$var? on OS X

2006-11-26 Thread Brian Dunning
I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] EZ array problem - What's wrong with my brain?

2006-11-30 Thread Brian Dunning
var_dump() gives me this: array(1) { [1.2]= array(2) { [code]= array(1) { [0]= string(3) 111 } [status]= array(1) { [0]= string(3) new } } } I'm trying to set a variable to that 1.2. Shouldn't I be able to get it with $var = $arr[0][0]?

Re: [PHP] EZ array problem - What's wrong with my brain?

2006-12-01 Thread Brian Dunning
PGP SIGNED MESSAGE- Hash: SHA1 Well, I've only just fallen out of bed, but I'd say you'd be able to access it via $var[0][0][0] as in $var[1.2][code][0] to change 111 to something else and $var[1.2][status][0] to set/change new. Brian Dunning wrote: var_dump() gives me this: array(1

Re: [PHP] EZ array problem - What's wrong with my brain?

2006-12-01 Thread Brian Dunning
That works, but the value 1.2 is unknown, I can't hardcode it. On Dec 1, 2006, at 6:52 AM, Fredrik Thunberg wrote: Try $try = $var[1.2]; If your array looks like the one below then there is no $var[0] and therefore you get NULL /Thunis Brian Dunning skrev: That seems right to me too

[PHP] Simple PDF manipulation

2006-12-27 Thread Brian Dunning
Let's say I have a complicated PDF document, like a Christmas card, that was made in Illustrator -- too complicated to easily create from scratch using PDFlib. Is there a way to use PHP make simple text changes - like changing Dear XXX to Dear John? I've opened the files with a text editor

Re: [PHP] Simple PDF manipulation

2006-12-27 Thread Brian Dunning
Interesting, that's a good idea. I was not aware that it was possible to load an existing PDF into memory and then add stuff to it. On Dec 27, 2006, at 7:28 AM, tedd wrote: At 6:32 AM -0800 12/27/06, Brian Dunning wrote: Let's say I have a complicated PDF document, like a Christmas card

[PHP] Hash/checksum for an image?

2007-01-15 Thread Brian Dunning
I want to make sure that a jpg uploaded by the user is unique. I was thinking about storing a hash code for each image in its MySQL record (got a db record for each uploaded image already). Is there an easy way to generate such a string? -- PHP General Mailing List (http://www.php.net/) To

[PHP] OS need anything for mail() to work?

2008-04-25 Thread Brian Dunning
I'm running PHP 5.2.5 on OS X 10.5.2, and using the following code: ini_set('sendmail_from','[EMAIL PROTECTED]'); ini_set('SMTP','working.server.com'); mail('[EMAIL PROTECTED]', 'Subject', 'Message'); The servers and addresses are KNOWN TO WORK, I use this same code and same info on a number

Re: [PHP] OS need anything for mail() to work?

2008-04-25 Thread Brian Dunning
Here is what the log shows for the attempts: Apr 24 17:03:34 MacBrian postfix/error[10699]: F19D21287847: to=[EMAIL PROTECTED] , relay=none, delay=4470, delays=4440/30/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to skeptoid.com[72.32.102.215]: Operation timed

Re: [PHP] OS need anything for mail() to work?

2008-04-25 Thread Brian Dunning
Is there any way for PHP to know that this email is not going through? On Apr 25, 2008, at 1:21 PM, Eric Butera wrote: Apr 24 17:03:34 MacBrian postfix/error[10699]: F19D21287847: to=[EMAIL PROTECTED], relay=none, delay=4470, delays=4440/30/0/0, dsn=4.4.1, status=deferred (delivery temporarily

[PHP] Adding a page with FPDF

2008-06-18 Thread Brian Dunning
Anyone use FPDF? I'm trying to create a new document in memory, starting with a template document - I'm going to add some stuff to it. The template document might be any size and dimensions. Here is the code I'm using, and my problem is that the resulting document is always an 8.5x11

Re: [PHP] Online Job Available

2008-06-18 Thread Brian Dunning
Yes, I'm sure it's legit, thus your obviously real 2 names and 3 email addresses. :-) On Jun 18, 2008, at 7:33 AM, Brock Diegel wrote: Hi, Our online market research organization starts recruiting self- motivated and reliable individuals willing to take part in well-paying research

[PHP] Simple array problem

2008-06-30 Thread Brian Dunning
I'm trying to add a number to a value in an array. Pretend I have this: $new_value = array('orange', 2); $arr = array( array('blue', 4), array('orange', 5), array('green', 6)); I want to add the new value to the existing matching array element, so I end up with this:

[PHP] Splitting up long URLs

2008-07-01 Thread Brian Dunning
I have a web page that lists most recent comments in a left margin. Sometimes people post long URLs, or even just really really long words, that force that margin to display way too wide, screwing up the page layout. Is there a way to make sure URLs or other text in a string gets split up

[PHP] Timing problem, putting PNG into PDF

2008-08-11 Thread Brian Dunning
I'm using GD to crop save an uploaded image, and then embedding it into a PDF made with FPDI. It works great when the image is small or low-res. When the uploaded file is bigger, more than a couple hundred K or so, it fails. I think that the image is not done writing yet by the time I try

[PHP] Launching multiple PHP threads via Scheduled Tasks

2008-10-27 Thread Brian Dunning
I've got a script that downloads files queued from a server, and it's launched by a Windows Scheduled Task that launches every minute. My understanding of the default behavior is that if the task is still running a minute later when it's time to launch again, a duplicate thread will not be

[PHP] Can GD make a JPG thumbnail of a PDF?

2008-11-20 Thread Brian Dunning
Well can it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Anyway to simulate pcntl_fork() on Windows?

2008-11-21 Thread Brian Dunning
It's the function I need most and it's not available on Windows, and unfortunately that's what the client uses. Any suggestions for a workaround? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Slow file download

2008-12-02 Thread Brian Dunning
I'm using a PHP cron job to constantly download files from a remote server. Client and server both have abundant unused bandwidth, and the sysads have already eliminated switches, interface cards, etc. as the source of the slowdown. I'm looking at the script to see why file downloads are

Re: [PHP] Slow file download

2008-12-02 Thread Brian Dunning
I'm open to something like that - we're in the middle of the holiday crunch and can't afford any downtime, so a significant change is out of the question. This is part of much larger and more involved scripting, so it would need to be a plug-n-play replacement and also be able to return

Re: [PHP] Re: Slow file download

2008-12-02 Thread Brian Dunning
IIS, Windows PHP 5.2.6, and unfortunately the downloads are https. On Dec 2, 2008, at 12:32 PM, Nathan Rixham wrote: what's the server running? iis/apache, win/linux version of php (as accurate as you can) oh and via http or https/ssl? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Can GD make a JPG thumbnail of a PDF?

2008-12-10 Thread Brian Dunning
I've spent most of the last week trying to get ImageMagick working on my Windows PHP installation. I gather that since I'm going to be converting PDFs to JPEGs, I need Ghostscript. Well, I've got ImageMagick installed: http://printhq2.com/info.php I ran a Ghostscript installer, but it didn't

[PHP] Help debugging a file upload on IIS

2008-12-29 Thread Brian Dunning
Hi - I have a file upload that returns no error, but the file does not appear on the server. Here is the result of $_FILES: Array ( [f] = Array ( [name] = Elephants.pdf [type] = application/pdf [tmp_name] = C:\WINDOWS\Temp\php3133.tmp

Re: [PHP] Help debugging a file upload on IIS

2008-12-29 Thread Brian Dunning
The one thing I was doing was: move_uploaded_file($_FILES['upload_file']['tmp_name'], $new_path); but nothing was happening, no new file appearing where it was supposed to, and no error returned, left me scratching my head. (Later the same script logs the upload to MySQL using data from

[PHP] IM Convert PDF-JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
Here's a weird thing. I have a new Redhat machine, with PHP 5.2.6 and IM 6.4.8. The following works beautifully on the command line: convert original.pdf new.jpg But from PHP, it only works beautifully if I specify complete pathnames for convert, the original file, and the new file (that's

Re: [PHP] IM Convert PDF-JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
My typo skipping the '/html/' in the pathname, the paths are correct in my actual code. On Dec 31, 2008, at 3:24 PM, Brian Dunning wrote: /var/www/html/original.pdf /var/www/html/new.jpg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IM Convert PDF-JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
Interesting. When I try this, $return_output gives an empty array, and $return_code gives 1. On Dec 31, 2008, at 3:38 PM, chris smith wrote: Try using exec() so you get the whole return message, might be something useful in there. exec($command_line, $return_output, $return_code); --

Re: [PHP] IM Convert PDF-JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
OMG. I had not set the permissions properly on the destination directory. It works now. Sorry for wasting the list's time, and thanks to Chris for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Anyone else have trouble with Apple Mail threading this list?

2008-12-31 Thread Brian Dunning
I use Apple Mail, and subscribe to many lists but PHP-General is the only one I have this problem with. People tell me that my replies are not properly threaded to the original post. When I hit Reply or Reply All in Mail, it wants to reply directly to the poster, and only CC's the list. So

[PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Brian Dunning
I have one server that's pretty busy and runs into Too many connections from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, but no matter what I

[PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: 3.jpg- 3316x2220, 3.6 MB And am trying either of the following: // This does nothing at all imagejpeg('3.jpg'); // This displays failed $im = imagecreatefromjpeg('3.jpg'); if(!$im) echo 'failed';

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
Same thing, no output at all. I can access the image directly in my browser and it's fine. On Jan 9, 2009, at 7:52 AM, Zechim wrote: try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file); imagejpeg($image,, 100); imagedestroy($image); zechim -- PHP

[PHP] Convert CMYK values to RGB values?

2009-01-09 Thread Brian Dunning
Anyone know how to convert CMYK values to RGB values? I'm just trying to translate the numbers from one to the other, not actually do any graphic stuff. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Convert CMYK values to RGB values?

2009-01-09 Thread Brian Dunning
I think your short answer is the right one. This explains why I didn't find that cmyk_to_rgb() function on php.net. Thanks... :-( On Jan 9, 2009, at 3:14 PM, c...@l-i-e.com wrote: Short Answer: You can't. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
I'm going crazy, can't quite get this encoding to work. I've tried all the various combinations, trying to send this block $xml (which is a simple string variable) via post along with 3 other params: $postArgs = http_build_query(array('method'='newPrintRequest', 'login'=$login,

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
Just realized I didn't happen to mention the problem. :-) The server is not seeing any of my posted fields. It's returning a properly-formatted XML response that says I did not submit the required fields. Unfortunately the server is a black box, but lots of other partners use it every

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line, all I get back from the server is a '1' and their tech reports that no valid call was received from me. On Feb 11, 2009, at

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
look at my code, it clearly is. On Feb 11, 2009, at 5:08 PM, Stuart wrote: 2009/2/12 Brian Dunning br...@briandunning.com: This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line

[PHP] Need to hire some PHP help...

2009-02-12 Thread Brian Dunning
I need probably no more than an hour of two of help from someone better than me at PHP, but have money sitting here ready to pay you. My project is way behind schedule and I'm burning too much time and making no progress trying to solve two problems. (1) Submitting some XML to a web

[PHP] PHP Applications?

2005-05-17 Thread Brian Dunning
Hi all - My background is mostly with Lasso. One cool feature is the ability to make LassoApps - single file applications that are secure and can be sold distributed without providing access to the source. Does PHP offer any such capability? - Brian -- PHP General Mailing List

[PHP] Dwonloading a file

2005-05-18 Thread Brian Dunning
I need to write a cron job that retrieves a zipped XML file via FTP, unzips it, and then imports the XML into MySQL. I haven't done any of these three specific functions yet. Before I tear my hair out on each of these functions, can anyone point me to a simple example of any or all three?

[PHP] Rusty's Magpie mod to cache to database

2005-05-27 Thread Brian Dunning
Has anyone ever used Russ Johnston's modified Mapgpie RSS to cache to a database? I'm trying to, but no records are being written to the database - just wondering if anyone's had success. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] How to find random records in a subset?

2005-06-02 Thread Brian Dunning
I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, and then use MySQL's in command to find them. I can't use order by rand() due to its performance hit. But I have to take it one more step: I

Re: [PHP] How to find random records in a subset?

2005-06-03 Thread Brian Dunning
On Jun 3, 2005, at 6:48 AM, Marek Kilimajer wrote: Brian Dunning wrote: I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, why can't you use the where condition in the above query

[PHP] What are these weird variables??

2005-06-03 Thread Brian Dunning
I'm using a class that I downloaded, and to access the database it uses variable names in all caps, like this: if(!defined(MAGPIE_DBUSER)) define(MAGPIE_DBUSER, brian); ... $dbuser = MAGPIE_DBUSER; ... $dbh = mysql_connect($dbhost,$dbuser,$dbpass); And it works fine. But I already

[PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
I have an include file with about 6 lines of code, just text parsing. If I have to loop through 5000 records, is there a big difference between (a) calling this include file 5000 times, and (b) defining a function and just calling the function 5000 times? -- PHP General Mailing List

Re: [PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
On Jun 9, 2005, at 9:48 AM, bruce wrote: bian... giave a psuedocode example of what you're trying to compare.. i think i know what you're asking, but i want to be sure.. OK, this is *pseudocode* remember... :) Is either of these SIGNIFICANTLY slower: === Example 1 === while(loops

Re: [PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
On Jun 9, 2005, at 9:44 AM, Jochem Maas wrote: or (c) just placing the code inside the loop - no function call , no include, just wash and go ;-) - whichever is faster of (a) and (b), my (c) will be faster still. :-) I agree (c) would be swell but this is a function that I call from many

Re: [PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
On Jun 9, 2005, at 10:54 AM, Jochem Maas wrote: unless you intend to make a call to your function from inside the include file, No, the question is which of the two to use, not both. :) I've built a version that uses a function, will test, and will post the results. -- PHP General

Re: [PHP] Is there a big speed difference...

2005-06-12 Thread Brian Dunning
On Jun 11, 2005, at 6:24 PM, Richard Lynch wrote: Have you actually tried it yet, either way? Cuz I suspect you are worrying over a lot of nothing... I did post the results a couple of days ago. Switching to a function made an enormous difference. It went from an average of 45 seconds to

[PHP] Anyone ever upgraded PHP at GoDaddy?

2005-06-15 Thread Brian Dunning
GoDaddy's Virtual Dedicated Servers come with PHP 4.2 - anyone ever upgraded this to 4.3 or later? I've never done any command line stuff or anything like that - is there an easier way? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Anyone ever upgraded PHP at GoDaddy?

2005-06-15 Thread Brian Dunning
On Jun 15, 2005, at 2:28 PM, Greg Donald wrote: Make yourself a phpinfo() page. Your PHP configuration will be at the top of the page. You can use that configure line to build/upgrade to a newer PHP. I see that, thanks - but if you'll forgive an ignorant question, what do I do with that

[PHP] Help recognizing bots?

2005-06-22 Thread Brian Dunning
I'm using the following code in an effort to identify bots: $client = $_SERVER['HTTP_USER_AGENT']; if(!strpos($client, 'ooglebot') !strpos($client, 'ahoo') !strpos ($client, 'lurp') !strpos($client, 'msnbot')) { (Stuff that I do if it's not a bot) } But it doesn't seem to be catching a

[PHP] Can't even make a simple test RSS feed

2005-06-24 Thread Brian Dunning
What am I doing wrong? This doesn't work. The browser does not even load the page, no error or anything: ?php echo '?xml version=1.0?rss version=2.0channel'; echo 'item'; echo 'titlehdfghdf/title'; echo 'descriptiondfghdfh/description'; echo 'linkhttp://somelink/link'; echo '/item'; echo

Re: [PHP] Can't even make a simple test RSS feed

2005-06-24 Thread Brian Dunning
I'm ahead of you there - that's not the problem. IE6 just acts like I didn't request a page. Safari returns a “unknown error” (NSURLErrorDomain:-1). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help - need to quickly optimize a record count!

2005-07-06 Thread Brian Dunning
I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: select count(*) as `count` from terms; My MySQL account was disabled by my ISP because this

Re: [PHP] Help - need to quickly optimize a record count!

2005-07-06 Thread Brian Dunning
... On Wed, 6 Jul 2005, Brian Dunning wrote: I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: select count(*) as `count` from terms; My MySQL

Re: [PHP] Help - need to quickly optimize a record count!

2005-07-06 Thread Brian Dunning
, 2005, at 5:51 PM, Richard Lynch wrote: On Wed, July 6, 2005 1:43 pm, Brian Dunning said: I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: Define

[PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
I want to create a pixel that can be used to track certain activity on the site. I've got it working fine: I just mod_rewrite spacer.gif to a PHP app that does what I want it to do; but then I don't know how to actually return a blank pixel. Can anyone point me in the right direction? --

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
=imagecolorallocate($im,255,255,255); imagesetpixel($im,1,1,$white); header(content-type:image/jpg); imagejpeg($im); imagedestroy($im); ? I guess this begs the question, why not use session variables to track activity?? Matt Darby Brian Dunning wrote: I want to create a pixel that can be used

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
I did some more STFW and came up with this - I'll try it to see if it works. Header( Content-type: image/gif); printf (%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c% c%c%c%c%c%c%c%c%c%c%c%c%c, 71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0

[PHP] How to turn on session.trans.sid?

2005-07-28 Thread Brian Dunning
If an ISP does not give you access to php.ini, is there a way to turn on session.use_trans_sid in the code, maybe at the same time you say session_start()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Still not holding sessions when cookies off.

2005-07-28 Thread Brian Dunning
I'm starting my sessions like this: ini_set('session.use_trans_sid','1'); session_start(); Works fine when cookies are on. Sessions are not being preserved when cookies are off. Is there something else I need to do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Setting up a new box from scratch?

2005-08-03 Thread Brian Dunning
Hey all - I have an unused Pentium box here, recent, well loaded with RAM and HD. I want to turn it into a LAMP box. Never done that before; is there a preferred one-stop-shop installer CD or anything (easy - knock on wood)? It would be nice to end up with some kind of decent web GUI for

[PHP] Timing out a remote call

2005-08-04 Thread Brian Dunning
For one project, I'm required to access a web service for every page. Basically it returns a little bit of random text. I have no control over the web service, and there is no possibility of cacheing or bringing it locally: the requirements are that it be accessed live across the Internet

[PHP] Possible to read JavaScript results into a string?

2005-08-08 Thread Brian Dunning
I have an external JavaScript that I use on several of my sites. It returns a web counter and does some other logging. It's accessed like this: script language=javascript src=http://www.mydomain.com/log.js;/ script No rocket science there, this is common and it works great. That call

[PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
What is the best way to cloak a site - send search engines different content than real users? Yes, I know it's bad practice, and I know the domain will eventually be banned. I've found lots of different methods including huge tables of all the possible client types sent by various spiders.

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
On Aug 11, 2005, at 3:44 PM, Evert | Collab wrote: Use robots.txt 'evil' searchengines will spoof the user-agent string anyway Can you be more specific about what you mean by use robots.txt? I just want to cloak for Google, MSN, and Yahoo. I couldn't care less about what any other search

  1   2   3   4   >