[PHP] Delete an upload

2006-07-17 Thread Benjamin Adams
I created a form where users can upload. I'm working on the section where admins can delete entries. When I have a user delete an entery, I have it taking out of MySQL (working fine) But how do I delete the file that was uploaded? Thanks for any help Ben -- PHP General

[PHP] parse text file

2006-07-23 Thread Benjamin Adams
how would I read a file one line at a time: ?php if($lines $alllines){ $newline .= $lines; } ? something like that, I'm cofused on if I use fread, something which will do one line at a time? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] parse text file

2006-07-23 Thread Benjamin Adams
Thanks, fgets works great didn't know the function before. On Mon, 2006-07-24 at 01:56 +0530, Sameer N Ingole wrote: Joe Wollard wrote: Benjamin, Use the file() function, it will read a file then return each line as a new element in an array. http://php.net/file And if file is big

[PHP] Disable all caching

2006-10-10 Thread Benjamin Adams
I have a php (ver 4.x) script that is being cached. I have placed: META HTTP-EQUIV=CACHE-CONTROL CONTENT=NO-CACHE 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] working with ini files

2006-02-28 Thread Benjamin Adams
I have created my own ini file. I can read the values into an array fine. but What I want to do is change a value in the ini file. Example file.ini dog = 3 cat = 4 fish = 7 altered file.ini dog = 3 cat = 5 fish = 7 how can I do this, I tried using ini_set but its not working. help would be

[PHP] preg_replace problem

2006-03-01 Thread Benjamin Adams
$file = dog.txt; $today = date(Ymd); function incDate($new, $date){ //$date = settype('int'); return $new.($date++); } $getOldValue = parse_ini_file($file, 1); $newValue = $getOldValue[$today] + 1; $oldDate = $today . = . $newValue; $newDate =

[PHP] subtract dates

2006-03-01 Thread Benjamin Adams
I'm trying subtract to dates the user enters in and get the days between. Dates are stored as date('mdY') is there a built in function to subtract to dates is this format? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Detect where someone comes from

2006-03-06 Thread Benjamin Adams
I was wondering if there was a way I can see where people are linking to me from. Can I find this in php? --Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Detect where someone comes from

2006-03-06 Thread Benjamin Adams
I have banners on other websites. I'm trying to detect who is clicking on what banners. I can have the company that has the banners throw a ? bannercompany='companyname' and do a query on that but I would like to do it just by auto detecting Ben On Mar 6, 2006, at 11:21 AM, [EMAIL PROTECTED]

Re: [PHP] Detect where someone comes from

2006-03-06 Thread Benjamin Adams
Currently I have an ini file that has the list of banner websites I can make it count problem is: $_SERVER['REFERER'] will give me the full link http://www.domain.com/dir/location/file.php where I just want the http://www.domain.com/ Ben On Mar 6, 2006, at 11:39 AM, Benjamin Adams wrote: I

Re: [PHP] Detect where someone comes from

2006-03-06 Thread Benjamin Adams
Got it Thanks!! Ben On Mar 6, 2006, at 12:13 PM, Stut wrote: Benjamin Adams wrote: Currently I have an ini file that has the list of banner websites I can make it count problem is: $_SERVER['REFERER'] will give me the full link http://www.domain.com/dir/location/file.php where I just want

[PHP] Make all emails links

2006-03-08 Thread Benjamin Adams
I'm pulling data from a database; When the data is pulled emails look like [EMAIL PROTECTED] Is there a way to just make all email address in the text that it pulls so, bla bla bla okjsokdf [EMAIL PROTECTED] ksnow noduowe... Make the email in the text be a mailto link automatically? Thanks

[PHP] Random value from ini file

2006-03-28 Thread Benjamin Adams
I have an ini file that has: 1 = words; 2 = words1; 3 = words3; I want to pull a rand value and print it out I'm trying to use parse_ini_file but its not working any help would be great. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] XML-RPC or SOAP

2006-03-31 Thread Benjamin Adams
I want to take a mysql database that I have and turn it into a wsdl page where I can make a client program connect to. I have read how to do it in Tomcat. but looking for help in using PHP. On Mar 30, 2006, at 9:45 PM, Anthony Ettinger wrote: what about WSDL? On 3/30/06, Russell Jones

[PHP] pause until page is loaded

2006-04-18 Thread Benjamin Adams
I created a script to redirect to a download auto. but it redirects before the Whole page is loaded. How do I pause until page is loaded? Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pause until page is loaded

2006-04-18 Thread Benjamin Adams
I tried it but it still stops half way through the page and then continues. On Apr 18, 2006, at 5:24 PM, Jay Blanchard wrote: [snip] I created a script to redirect to a download auto. but it redirects before the Whole page is loaded. How do I pause until page is loaded? [/snip] Page loading

[PHP] permissions

2006-04-21 Thread Benjamin Adams
I have a text file that is just being read by php Can I change the permissions of it so www can not read it? what username does php uses to read files? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] odbc remote

2006-06-07 Thread Benjamin Adams
how do I do a remote connection for odbc? Everything that I see is on the local machine. Can you do an odbc to a remote database? Benjamin Adams / Lord of the Root / Ambrosia Software, Inc. -- http:// www.AmbrosiaSW.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Filter php page

2006-07-05 Thread Benjamin Adams
can I create a script that will search a php page for iframes. And have it check the path of the iframe, If the iframe is listed as bad don't show. (list I make) Trying to do something with virus like through an iframe. I don't really know where to start looking for help. --Ben -- PHP

[PHP] Working with a config file

2006-02-20 Thread Benjamin Adams
I'm trying to parse a config file, example of the config is: [fred] id=8782 section=s1 years=4 download1=mirror1 [frank] id=8372 section=s3 years=4 download1=mirror12 download2=mirror2 . . . I want to parse this so I can only call frank or freds data and move id, section, years, etc to

[PHP] auto download

2006-02-22 Thread Benjamin Adams
I have three links. The code already auto selects one. I'm trying to take that one link and automaticly start the download. I tryed with header('location:$link'); but it tells me Warning: Cannot modify header information what would I use to start downloading? one of the link is another page so I

Re: [PHP] auto download

2006-02-22 Thread Benjamin Adams
]['link3']?'); /script ?php }else{ ? script type=text/javascript window.open('?=$conf[$links]['link1']?'); /script ?php } ? Only the first if runs and is true all the time. What is wrong with the code? On Feb 22, 2006, at 12:41 PM, John Nichel wrote: Benjamin Adams wrote: I have