RE: [PHP] sceen grab

2004-06-24 Thread Matt Matijevich
[snip] The catch here is that my target is an asp page that requires a login to get to the page I would like to get to. They do allow for the check here so i will be remembered next time, but will that work with a php screen grab. [/snip] http://pear.php.net/package/HTTP_Client -- PHP

Re: [PHP] substr_count

2004-06-24 Thread Matt Matijevich
[snip] Anyway, to get this to return a count of two? [/snip] just strtolower or strtoupper both $strHaystack and $strNeedle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MYSQL Query results in pages

2004-06-24 Thread Matt Matijevich
[snip] Is this right? Is there other efficent way to do it? What about if data changes (i.e. new records are added) while the user browses through pages? [/snip] on each page do a: SELECT count(*) FROM table WHERE your_condition this will give you your total number of results -- PHP General

Re: [PHP] a stupid question

2004-06-24 Thread Matt Matijevich
[snip] echo Some text.aFunction().some more text; [/snip] Have you checked to see if aFunction() is returning anything? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] a stupid question

2004-06-24 Thread Matt Matijevich
[snip] echo Some text; aFunction(); echo Some more text; [/snip] What is printed out? if aFunction() is returning the string test then this code: echo Some text.aFunction().some more text; should print out: Some texttestsome more text -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Help with creating an XML Document

2004-06-23 Thread Matt Matijevich
[snip] Can someone help me fix my code so that when I add an element I can also set some contents or a value for that element? example serial_number000/serial_number [/snip] $doc = domxml_new_doc(1.0); $root = $doc-add_root(Server); $root-set_attribute(Name, pxtest01); $el =

Re: [PHP] CSV explode problem

2004-06-23 Thread Matt Matijevich
[snip] I have a csv string. But the string also contains other strings with commas. [/snip] is the csv coming from a file? if it is try http://www.php.net/manual/en/function.fgetcsv.php if not there is some user comments on that page that might help. -- PHP General Mailing List

Re: [PHP] Trying to create and save a DOM XML file.

2004-06-23 Thread Matt Matijevich
[snip] So I have: $doc-save(/tmp/test.xml); This does not work Thoughts? [/snip] you have this in your previous email $doc-dump_mem() . Just do this $file = $doc-dump_mem(); then write $file to a file. there is also this http://www.php.net/manual/en/function.domdocument-dump-file.php

Re: [PHP] CSV explode problem

2004-06-23 Thread Matt Matijevich
[snip] Any help with parsing a string to replace those comma in string? [/snip] this was in the user comments on http://www.php.net/manual/en/function.fgetcsv.php function csv_split($line,$delim=',',$removeQuotes=true) { #$line: the csv line to be split #$delim: the delimiter to split by

Re: [PHP] bad programming?

2004-06-23 Thread Matt Matijevich
[snip] The part that's not working is the $REQUEST_METHOD=='POST' line. [/snip] try $_SERVER['REQUEST_METHOD'] instead of $REQUEST_METHOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Filesize

2004-06-23 Thread Matt Matijevich
[snip] Have I gone loopy? Wait, don't answer that. Do I need to do something else to get the file size? I have read and searched, but to no avail yet. TIA! [/snip] Have you tried absolute path in filesize($theFile); or maybe chdir to $arrDirectory[$i] -- PHP General Mailing List

Re: [PHP] Get users MAC-address of visitor

2004-06-23 Thread Matt Matijevich
[snip] What i am thinking about is using the MAC-address instead of the IP-address to ban troublesome users from forums etc. [/snip] Do you make people login? If you do couldn't you just flag troublesome users and not allow them to login. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] I don't want to use include

2004-06-22 Thread Matt Matijevich
[snip] When I use include, my script is waiting included script results. But I just want to run another local script without wait result. [/snip] you could try something like this $cmd =/path/to/php.exe . ' ' . /path/to/your/script exec($cmd); check out

Re: [PHP] Help with eregi

2004-06-22 Thread Matt Matijevich
[snip] client1/album/album_121-2132_IMG.JPG client2/album/album_121-2132_IMG.JPG client59/album/album_121-2132_IMG.JPG client499887/album/album_121-2132_IMG.JPG I want to select whatever comes after the last forward slash, like album_121-2132_IMG.JPG [/snip] you could try without regular

Re: [PHP] Image Uploader

2004-06-22 Thread Matt Matijevich
[snip] I am trying to create an image uploader however, the code I have created doesn't seem to upload the images. If anyone sees any ways that I can get this to work or if you know any better ways, please let me know. [/snip] that is quit a bit of code. Are you getting any specific errors?

Re: [PHP] TIFF display problem...

2004-06-21 Thread Matt Matijevich
[snip] session_start(); if ( !$_SESSION['user_id'] ) { exit(); } [/snip] Are you sure you are getting past the if ( !$_SESSION['user_id'] ) condition? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] TIFF display problem...

2004-06-21 Thread Matt Matijevich
[snip] Yeah, positive, I should probably clarify more. session_start(); is what causes it not to display, and gives me the error. The error is that the site cannot download the file. [/snip] I dont know much about the plugins to view the tiff's, but maybe some of the http headers that

RE: [PHP] TIFF display problem...

2004-06-21 Thread Matt Matijevich
[snip] The only problem with turning them off is I need the page to be secured. My only option is session tracking. [/snip] session management does not require that these headers be sent to the browser to work. Try turning off the cache-control headers. The cookie and the headers are

Re: [PHP] Programming User-Customized Categories ??

2004-06-18 Thread Matt Matijevich
[snip] I need to allow users to define the types of Main Categories they want, and to also define whether or not those Main Categories will have Sub Categories, which they can also define. [/snip] if I follow you correctly, I would do it like this users table user_id primary key name etc... not

[PHP] Re: PDF Templates with PHP

2004-06-17 Thread Matt Matijevich
[snip] I am wondering if it is possible to generate a pdf page with pdflib based on a existing pdf document [/snip] Look into the pdflib examples that you get when you download pdflib. I am pretty sure there is an example invoice template in it. Also look into the pdf blocks in pdflib. -- PHP

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Matt Matijevich
[snip] ?php $file =/var/log/radius.log; $fp = popen(/usr/bin/tail -$limit $file, 'r'); if (! $fp ) { echo 'unable to pipe command'; } while (!feof($fp) ) { $line = fgets($fp, 4096); print $line.br; } ? I've tried bumping up the 4096 to a higher number because it currently only shows me

Re: [PHP] PDF generator?

2004-06-17 Thread Matt Matijevich
[snip] I have a PDF that I need to insert values into from a web form. I would like to input directly into the PDF from the web. [/snip] http://www.php.net/pdf if you want to get the license. http://www.php.net/fdf fdf There is also the option on just editing the text in the pdf but I have not

Re: [PHP] Read Last Lines of a Text File

2004-06-16 Thread Matt Matijevich
[snip] I've created the code below, but since this file is so large (currently 8 MB) it won't work. [/snip] I would guess you are running into your php memory_limit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fopen successful..cant write to the file though permissions are ok..

2004-06-11 Thread Matt Matijevich
[snip] $filename/tmp/newfile); $filehandle=fopen($filename,w); fclose($filehandle); [/snip] is this the exact code you are trying to use? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file knowing its own directory

2004-06-09 Thread Matt Matijevich
[snip] So, what do I replace I_NEED_A_FUNCTION_HERE with? [/snip] not eaxatly sure what the question is. Couldn't you use getcwd ? That would give you current working directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDA / Normal Browser

2004-06-08 Thread Matt Matijevich
[snip] Is it possible to use PHP to detect the type of browser accessing my site. For example if a PDA is using it I would prefer not to include large graphics... [/snip] you can check the user-agent, no gaurantees what if anything that is sent is accurate. -- PHP General Mailing List

Re: [PHP] source code display

2004-06-07 Thread Matt Matijevich
[snip] When I try to bring up an index.php3 file on a browser, what display are source codes. [/snip] I dont see ? or ?php anywhere. Do you have that somewhere in your code? If you do, are you sure php is installed on the server? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] script location

2004-06-04 Thread Matt Matijevich
[snip] http://www.nowhere.com/test/whatever/testing.php All I want out of that URL is this: /test/whatever/ [/snip] http://php.net/dirname I think that will do it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP and Apache Authentication

2004-06-04 Thread Matt Matijevich
[snip] Is there a way to configure apache to include something in every response? [/snip] I think you could use a autoprepend in your php.ini file http://www.php.net/reserved.variables there is a mention of it on the user comments on this page -- PHP General Mailing List

Re: [PHP] Error Downloading files using FOpen

2004-06-04 Thread Matt Matijevich
[snip] When you go to download a file off a page it corrupts the download. [/snip] not sure what the exact problem is, but have you tried other functions, like readfile http://www.php.net/manual/en/function.readfile.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Please help, problem with set_ini

2004-06-02 Thread Matt Matijevich
[snip] I'm having a problem with a set_ini command... I need to be able to set the -f parameter (to set the originating address on my server). I am getting a false response code when I run the following command: [/snip] looks like sendmail_path has to be set in http.conf or php.ini

Re: [PHP] Keep PHP variable values between script calls - XML RPC

2004-05-27 Thread Matt Matijevich
[snip] I would like to implement an XML-RPC server (a script of course) that keeps the value of certain variables between the different invocations of the script. [/snip] Could you store them in a file? Maybe a database. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] array key starting with digit ending with string

2004-05-27 Thread Matt Matijevich
[snip] if($data[$currentVarNameInCycle]) { do something } Is there some way force the recognition of the key when it leads with a digit? [/snip] not sure I follow 100% but you could use a regular expression to detemine if it starts with a string. if (preg_match('/^\d/',$array_key)) {

Re: [PHP] array key starting with digit ending with string

2004-05-27 Thread Matt Matijevich
[snip] not sure I follow 100% but you could use a regular expression to detemine if it starts with a string. if (preg_match('/^\d/',$array_key)) { //do something } [/snip] I mean starts with a digit, sorry for 2 emails. I should proofread. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How do I use RewriteEngine for similar parameters?

2004-05-26 Thread Matt Matijevich
[snip] I am trying to use the RewriteEngine for the following two lines. One has one parameter and the other has two? [/snip] this is more of an apache question you could get better answers on an apache list http://httpd.apache.org/docs/misc/rewriteguide.html just check the first for prd_id

Re: [PHP] find out ip address [beginner]

2004-05-25 Thread Matt Matijevich
could you ping or gethostip that webserver using the sytem command, then parse what you recieve? $val = system ('ping -c 1 outherwebserver'); or $val = system ('gethostip outherwebserver'); //then parse $val to pull out the ip address there is probably a better way to do it though, not even sure

Re: [PHP] Simple MySQL/PHP Query

2004-05-20 Thread Matt Matijevich
[snip] Do I need to select the body, then add the text to it, then UPDATE it [/snip] that is what you want to do -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Date Function - Empty Value

2004-05-19 Thread Matt Matijevich
[snip] Well, I would, but I can't seem to figure out how to export just the structure out of access. Wouldn't NULL be allowed by default? [/snip] Do you have access to the mdb file? If you do you can just go into design view of the table to find out the data definitions. -- PHP General

[PHP] PDFLib pdf_get_pdi_value

2004-05-18 Thread Matt Matijevich
I am trying to do some PDF templating work with PHP/PDFLib. I have a template file created and I am able to use all of the php functions for pdf's but I am having a slight problem: here is part of my code $pdi_file = $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF']).'/block_test.pdf';

Re: [PHP] PDFLib pdf_get_pdi_value

2004-05-18 Thread Matt Matijevich
I figured out what was wrong. If you are interested in my solution here it is: I did some searching in the PDFLIB documentation and I needed to set this at the top of my script to show some errors pdf_set_parameter($pdf, 'pdiwarning', 'true'); then, to fix the problem I needed to add this

Re: [PHP] [Newbie] Simple stats from mysql table data

2004-05-17 Thread Matt Matijevich
[snip] I would very much appreciate if someone could point me to eg. code examples helping me to accomplish this task. [/snip] Google and http://www.php.net/ are going to be your best friends, this mailingin list is also very helpful but search those 2 places before you ask. I am assuming that

Re: [PHP] what do '?' and ':' do?

2004-05-17 Thread Matt Matijevich
[snip] what does the semicolon and the question mark do? [/snip] http://www.php.net/operators.comparison look at the ternary operator -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_post and array question

2004-05-17 Thread Matt Matijevich
[snip] functionX($_POST[test_arr]) $arr_test = $_POST[test_arr]; Knowing that $_POST[test_arr]) does not exist.. this code will not result in a error. Is this a bug,error,etc? Should this not also produce a novice error? [snip] I think when you are doing this functionX($_POST[test_arr])

Re: [PHP] Yahoo and PHP

2004-05-14 Thread Matt Matijevich
[snip] how much more do they do with PHP? [/snip] I cant remember all of the details, but I think they are going to be (might already be) using it extensively. http://www.internetnews.com/dev-news/article.php/1491221 http://news.com.com/2100-1023-963937.html?tag=lh Do some googleing, you will

Re: [PHP] Webcapture to PDF

2004-05-13 Thread Matt Matijevich
[snip] Looking for a (open source) solution here: is there some way that I can convert an already existing HTML page to a PDF file, by means of a script (on a unix box)? [/snip] You could try http://www.easysw.com/htmldoc/ I have not used it but there is php examples on the site -- PHP

Re: [PHP] PHPSESSID Being Stubbornly Persistent

2004-05-13 Thread Matt Matijevich
[snip] ini_set('session.use_trans_sid', '0'); [/snip] I think, at least according to the manual session.use_trans_sid can only be set in php.ini, .htaccess or httpd.conf http://www.php.net/ini_set look at session.use_trans_sid -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: PHPSESSID Being Stubbornly Persistent

2004-05-13 Thread Matt Matijevich
[snip] Out of curiosity, how were you planning on passing session id's? Through POST variables? [/snip] I would guess cookie. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Load Data infile

2004-05-13 Thread Matt Matijevich
[snip] I need do load data infile in mysql: $query_string2 = LOAD DATA INFILE '/var/www/xls/test' REPLACE INTO TABLE `test` FIELDS TERMINATED BY ',' ENCLOSED BY '\' ESCAPED BY '\\' LINES TERMINATED BY '\n';$query_db_string2 = mysql_query($query_string2); But not realize nothing with execution the

Re: [PHP] loading 250kb include files, performance degration?

2004-05-11 Thread Matt Matijevich
[snip] I am working on a complex webapp written in php. Recently I was reading about performance issues and after analysing the code I found that most of the files load 5 external php include files to run. All together those include files make about 250KB (there are 5 files). [/snip] The more

Re: [PHP] oblivious to the obvious

2004-04-23 Thread Matt Matijevich
[snip] $sun_5a_n1 = 1; $sun_5a_t1 = 2; if($sun_5a_n1) { $result = mysql_query(UPDATE sunday SET a5_n_1='$sun_5a_n1',a5_t_1='$sun_5a_t1') while($row = mysql_fetch_array($result)) { (line 17)echo Sunday @ 5am slot modified to Name: $sun_5a_n1, Time: $sun_5a_t1br;

Re: [PHP] self documenting php

2004-04-22 Thread Matt Matijevich
[snip] What is a good tool to use for documenting php? I am looking for something like javadoc. I think there is phpdoc, just not sure if it's any good or if I should try to create my own. [/snip] http://pear.php.net/package/PhpDocumentor -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Problems with patterns

2004-04-21 Thread Matt Matijevich
you need to account fir white space if you want phrases \s+ I would switch to preg_match() instead of ereg() http://www.php.net/manual/en/function.preg-match.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Matt Matijevich
http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Matt Matijevich
on that page ther is examples ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != ..) { //add your logic to see if it is an .mp3 file right here, that can be done any number of ways echo $file\n; } }

Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip] Is the following code the best way to redirect someone to a different page using PHP? ?php header(Location: http://www.yahoo.com;); ? I looked for a redirect function of some kind and didn't come up with anything. Just curious what the consensus is... [/snip] yes

Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip] That's also known as breaking the back button, but is the only way to do it in PHP. A better way to redirect someone (and keep the back busson working) is to use the meta html tag. [/snip] How is that breaking the back button? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip] Also, when you're using PHP, it is rare that it is going to be better to use a meta tag to emulate an HTTP header. PHP has the header() function, and it can set real headers. [/snip] also, meta refreshes are easy to turn off. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] ADOdb Operator question

2004-04-08 Thread Matt Matijevich
[snip] e.g. $conn-Connect(false, 'scott', 'tiger', $oraname); [/snip] http://www.php.net/oop will give you some help. I am not even sure if I can explain it correctly. I believe you would say use - to call object methods and - to get/set the class variables. I am sure someone can give a better

Re: [PHP] Newbie question about operators

2004-04-07 Thread Matt Matijevich
[snip] foreach ($some_array as $name=$value) { ... some code ... } [/snip] http://www.php.net/foreach will give you a good explanation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Matt Matijevich
[snip] function connect_db() { if (!defined('_CONNECT_DB')) { $result = @mysql_pconnect(localhost, Username, Password); @mysql_select_db(database_name); define('_CONNECT_DB', $result); } return _CONNECT_DB; I call this function this way... $query

Re: [PHP] ADOdb installation

2004-04-02 Thread Matt Matijevich
Would each virtual host need to have a directory with the ADOdb scripts? No Just put the adodb scripts in the include_path, or just have a designdated place on your windows bow for adodb, then in you include statement just use something like include('c:\adodb\adodb.php'); //not exactly sure

RE: [PHP] Image output (Newb question)

2004-04-02 Thread Matt Matijevich
could you post all of your script? Is there any white space before your ?php tag? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Image output (Newb question)

2004-04-02 Thread Matt Matijevich
change your script to just this: ?php $link = mysql_connect(localhost, root, ); if ($link){ header(Content-type: image/png); $im = imagecreatefrompng(images/map/map-15x9.png); imagepng($im); //,images/.session_id()..png imagedestroy($im);

RE: [PHP] Image output (Newb question)

2004-04-02 Thread Matt Matijevich
Sorry for responding to myself but I also need to ad that you should not echo or print anything out in your php code before your header function or the text/html header will be sent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Image output (Newb question)

2004-04-02 Thread Matt Matijevich
you should have script, call it image.php or something like that, the only thing that should be in that script is this: ?php $link = mysql_connect(localhost, root, ); if ($link){ header(Content-type: image/png); $im = imagecreatefrompng(images/map/map-15x9.png);

Re: [PHP] Inserting string - need to trim comma

2004-04-01 Thread Matt Matijevich
snip function insert($table, $data) { $sql = INSERT INTO .$table. SET ; foreach ($data as $k=$v) { $sql.= $k. = '.$v.', ; } $sql.=;; $result = mysql_query($sql); } The only problem with the statement is the appended comma to each iteration - the statement generates a mysql error with the

Re: [PHP] Inserting string - need to trim comma

2004-04-01 Thread Matt Matijevich
snip --- Matt Matijevich [EMAIL PROTECTED] wrote: http://www.php.net/rtrim rtrim() trims whitespace, not commas. Hope that helps. Chris /snip string rtrim ( string str [, string charlist]) there is a second optional paremeter you can add to rtrim rtrim($var,','); will take any trailing

Re: [PHP] PHP Logo with a dog?

2004-04-01 Thread Matt Matijevich
snip Has anybody had the PHP logo in phpinfo() appear with a picture of a dog? /snip April Fools easter egg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread Matt Matijevich
snip I agree with you but when I first looked at this I too thought there was some way of doing this in php which might look more elegant. Seeing urls such as www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy67eh4563yh4635 looks fairly cumbersome and I'm sure I've seen something about

Re: [PHP] PHP alternative to Browser Hawk?

2004-03-30 Thread Matt Matijevich
snip Does anyone know of a good solid PHP alternative to the very good (but very expensive!) BrowserHawk? (http://www.cyscape.com/) /snip Dont know if this has all of the features you are looking for, but it has a bunch of them http://phpsniff.sourceforge.net/ -- PHP General Mailing List

Re: [PHP] login scripts not secure?? help!

2004-03-23 Thread Matt Matijevich
snip a href=securepage.php?_SESSION[username]=admin_SESSION[pwd]=passwordgo to secure page/a /snip Turn off register globals. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date()

2004-03-18 Thread Matt Matijevich
snip i am new to php, i am trying to call the date function this way: ?php echo date(d/m/y); ? and the result i get is: object18/03/04 any help would be appreciated /snip I recommend the manual and google http://www.php.net/manual/en/ref.datetime.php http://www.php.net/date

Re: [PHP] Retain form values...

2004-03-18 Thread Matt Matijevich
snip thoughts? /snip I would look into sessions http://www.php.net/session -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod

2004-03-18 Thread Matt Matijevich
snip I'm about 90% sure that URL strings are passed in the clear to SSL servers, so this would defeat the purpose of SSL. /snip I don't think this is true. You can see the query string in the address bar, but (with what little http knowledge I have) the http conversation is encrypted, if you

Re: [PHP] protecting directories and files inside them based on session variables

2004-03-04 Thread Matt Matijevich
snip http://www.mydomain.com/private/some_privat_file.doc and downloading this file! I need a way to make this file only accessible to users who have a user_id in there session - is this possible? Or is my only alternative to password protect this directory using the webserver and force users to

Re: [PHP] Link List

2004-03-04 Thread Matt Matijevich
snip I have tried to use readline to make this happen, but I'm getting error messages. Somebody with a suggestion about this? /snip have any code samples or example error messages for us? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Login Form weird behaviour in Mozilla/Netscape Not in IE

2004-03-03 Thread Matt Matijevich
Try an absolute url. Daniel Perez [EMAIL PROTECTED] 3/3/2004 8:55:06 AM Hi there, I´ve got a login form, that calls a script, to check if the user/pass match. If yes, the script do a header(Location : index.php). In Explorer works but not in Mozilla nor Netscape. Anyone knows something about

RE: [PHP] resubmitting $POST data to another script

2004-03-02 Thread Matt Matijevich
snip I already tried that, but had problems with ' ' . /snip Did you try the htmlentities function? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] About php and mysql

2004-02-24 Thread Matt Matijevich
snip I want to know how to control php program connect to MySQL Database System ( another computer machine ) ? /snip http://www.php.net/manual/en/function.mysql-connect.php http://www.php.net/manual/en/function.mysql-pconnect.php -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Working with MS-SQL

2004-02-24 Thread Matt Matijevich
snip But, I want to know is there any tools similar with php-mssql for php connect with MS-SQL ? Any other can help ? /snip 1. look at the manual http://php.net/mssql 2. try google 3. search the list archives -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Uploading Files

2004-02-24 Thread Matt Matijevich
try this if($userfile) { if(move_uploaded_file($_FILES ['userfile'], $uploadpath/$userfile_name)) { echo $userfile_name; echo Successfully Added!br\n; } else { echo (error!); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Connection handling and output_buffering

2004-02-23 Thread Matt Matijevich
snip Was reading through: http://uk.php.net/manual/en/features.connection-handling.php And I was wondering how PHP handles script termination when you have 'output_buffering = On' in your php.ini? If I have a long script that does lots of database stuff for example, and is riddled with

Re: [PHP] Delayed mail()... ?

2004-02-20 Thread Matt Matijevich
snip What they've asked for, is that when they reply to the enquiry, they are reminded to chase up the enqiry a few days later... Now I could give them a message on screen, if they happen to be in the admin area, but what i'd like to do , is simply mail the admin users, after say, 3 days.

Re: [PHP] PHP or MSIE Problem?

2004-02-20 Thread Matt Matijevich
snip Can anyone tell me if this is a common problem? Is this a purely MSIE bug, or could PHP be a factor? /snip I would guess it is a MSIE problem. You could check the raw post data coming into php too see if it is a php bug. I think $GLOBALS['HTTP_RAW_POST_DATA'] has the post data -- PHP

Re: [PHP] regular expressions

2004-02-17 Thread Matt Matijevich
snip Anyone recommend a book for a regex newbie ? /snip O'Reilly usually has some good stuff http://www.oreilly.com/catalog/regex/ There is plenty of tutorials online too, just google and you will get a bunch of results. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] * populate menu from directory *

2004-02-16 Thread Matt Matijevich
snip I want to be able to simply FTP a new movie onto the server, and then have the menu update itself. possible? I would also be looking to do something similar with JPGS. /snip take a look at http://www.php.net/readdir http://www.php.net/opendir here is some code to help start you echo

Re: [PHP] Are variables persistent?

2004-02-16 Thread Matt Matijevich
snip I'm guessing this is not a sensible approach. Every place I construct a url, I'd have to remember to add this. /snip Have you looked into sessions and/or cookies? I think you want to use $_POST not $POST -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Another preg question

2004-02-13 Thread Matt Matijevich
snip Next, I want to remove excessive CR/LF, [i.e. more than 2] $text= preg_replace(/\n\n+/, \n\n, $text); // remove excess This doesn't seem to do anything. /snip not 100% sure this is right but give it a try $text = preg_replace(/\n\n+|\n\r[\n\r]+|\r\r+/, \n\n,

Re: [PHP] [Q] Howto go directly to a URL?

2004-02-13 Thread Matt Matijevich
snip Can I avoid that intermediate step, somehow? When my script logs in the user, how to I write the code that dispatches directly to the home page? /snip Have you tried a redirect? http://www.php.net/header ?php header(Location: http://www.example.com/;); /* Redirect browser */ /* Make

RE: [PHP] Extract of a Paragraph

2004-02-04 Thread Matt Matijevich
snip $string = substr($stringname,0,50); echo $string; http://www.php.net/substr /snip That will just give the first 50 characters of the string. You could just try one of the many suggestions on http://www.php.net/manual/en/function.str-word-count.php Scroll down to the user comments and

Re: [PHP] Using sessions with register globals off

2004-02-04 Thread Matt Matijevich
snip Assuming there's a preceding page that has created the session 'name' and registered the var 'order' with the 'name' session. session_name('name'); session_register('order'); /snip Try $_SESSION['order'] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Session (maybe cookies)

2004-02-03 Thread Matt Matijevich
snip !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head titleUntitled Document/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body ?php session_start(); echo(session_id()); ? /body /html /snip Take a look

RE: [PHP] New lines

2004-02-03 Thread Matt Matijevich
[snip] This is where the var's $list and $additional_letters are filled. The file is called hangman.php. I want to open this file, put the words into a html file so that someone can change them and write them back. That's it. [/snip] is it out of the question to store the values in ther own

Re: [PHP] Str_Replace Command

2004-02-02 Thread Matt Matijevich
snip $StockURL = http://finance.yahoo.com/d/quotes.txt?s=xrx,ikn,dankyf=sl1e=.txt;; $StockResults = implode('', file($StockURL)); $Rows = split(\n, $StockResults); foreach($Rows as $Row) { list($Symbol, $Price) = split(,, $Row); $Symbol = str_replace('', , $Symbol); echo $Symbol.

Re: [PHP] Need Help - extract unstructured data for parse reformat and import into DB

2004-02-02 Thread Matt Matijevich
snip Would PHP be a good program to use for this project? Has anyone had to reformat unstructured data to insert into a database? If anyone has any suggestions or examples please let me know. J /snip If you have not already, look at regular expressions. imho, by far the best way to parse

Re: [PHP] Help with mail() function

2004-02-02 Thread Matt Matijevich
[snip] ?php if ($TextArea=) { echo You have to fill out the entire form, go back and try again.; } else { $to = [EMAIL PROTECTED]; $from = From-Test; $subject = Subject-Test; $message = $TextArea; mail($to, $subject, $message,From: $from); echo Thankyou; } ? [/snip] What is happening when the

Re: [PHP] Help with mail() function

2004-02-02 Thread Matt Matijevich
ahh, I have to correct myself replace this: if ($_POST['TextArea']=) { with this: if ($_POST['TextArea']==) { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Help with mail() function

2004-02-02 Thread Matt Matijevich
did you replace ($TextArea=) with ($TextArea==) ? ($TextArea=) will reassign $TextArea to Pooya Eslami [EMAIL PROTECTED] 2/2/2004 3:00:32 PM Well the problem is not that it won't get executed, its that every thing will be sent except the message in the textarea! subject, to and from are

Re: Re[2]: [PHP] Pulling unique data from database into an array

2004-02-02 Thread Matt Matijevich
[snip] while (!$recordSet-EOF) { $arrX = $recordSet-fields['user_id'] = $recordSet-fields['field_value']; $recordSet-MoveNext(); [/snip] while (!$recordSet-EOF) { $arrX[$recordSet-fields['user_id']] = $recordSet-fields['field_value']; $recordSet-MoveNext(); } -- PHP General Mailing List

Re: [PHP] Transferring an initiated Session to a Browser !!

2004-01-30 Thread Matt Matijevich
snip But I am also in need of a Mechanism where I can transfer an Initiated session to the User's Browser ... ( Not Just OutPutting the above variable .. But actually Transferring the Session to the User's Browser ) /snip not sure I understand 100% what you mean. You could send a cookie or

  1   2   >