[PHP] moving file from one server to another

2006-09-30 Thread Nick Wilson
kind of cgi capability). I was considering using exec() and scp to do this, but thought i'd ask and see if anyone had any better suggestions? many thanks -- Nick Wilson http://performancing.com/user/1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] moving file from one server to another

2006-09-30 Thread Nick Wilson
* and then Google Kreme declared On 30 Sep 2006, at 03:29 , Nick Wilson wrote: I need to let users upload to the regular LAMP box, but then copy the image over to the custom image server (which does not have php or any kind of cgi capability). I was considering using exec() and scp

[PHP] exec returns no output?

2006-09-30 Thread Nick Wilson
); print_r($argh); I can only surmise there is some setting todo with ssh/scp that im unaware of? any ideas welcomed, thanks! -- Nick Wilson http://performancing.com/user/1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] moving file from one server to another

2006-09-30 Thread Nick Wilson
/sftp'ing files into the image server dir is about as simple as it gets right? -- Nick Wilson http://performancing.com/user/1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] exec returns no output?

2006-09-30 Thread Nick Wilson
* and then Ray Hauge declared On Saturday 30 September 2006 7:22 am, Nick Wilson wrote: hi all, i've searched and racked my brains, checked config files and all sorts but cannot work out why the following command would give me an empty array (and certainly not actually perform

Re: [PHP] Re: exec returns no output?

2006-09-30 Thread Nick Wilson
* and then Colin Guthrie declared Nick Wilson wrote: Do you use generated keys without a password for logging in? Otherwise exec() is just going to sit there while the scp command waits for a password. Tha'ts exactly what i think it's doing. The -i specifies an identity file

Re: [PHP] Re: exec returns no output?

2006-09-30 Thread Nick Wilson
* and then Colin Guthrie declared Nick Wilson wrote: Right, im with you. The keyfile is mine though, and i know i can ssh from this box to that without any problem. I've made a test script for htis and it's returning some very weird stuff now. The actual file it outputs (stdout

Re: [PHP] Re: exec returns no output?

2006-09-30 Thread Nick Wilson
* and then Colin Guthrie declared Nick Wilson wrote: I think you're on the right track Col. I did a whole bunch more searching and the one thing I kept hearing was that no matter what you try, you just cant get the webserver to exec the script as another user -- so even if im saying

Re: [PHP] Re: exec returns no output?

2006-09-30 Thread Nick Wilson
, seems it all turned out good -- shame to spend the whole damn day on something so small though heh.. -- Nick Wilson http://performancing.com/user/1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: exec returns no output?

2006-09-30 Thread Nick Wilson
* and then Stut declared Nick Wilson wrote: That makes a lot of sense. I wasnt aware sudoers could be used for individual tasks. im not having much luck with it, I suspect it's cos what apache really needs permission to do is to 'sudo -u nick' right? Is it important that the transfer

Re: [PHP] When is a global not a global?

2006-07-13 Thread Nick Wilson
* and then Robert Cummings declared On Wed, 2006-07-12 at 18:52, Nick Wilson wrote: hi all, After upgrading a CMS, im having a problem with global variables not showing up anymore -- configs and things could have changed, but search as i have, i cannot find anything to help me

[PHP] When is a global not a global?

2006-07-12 Thread Nick Wilson
() { global $foo; print( -- . $foo); exit; } foobar(); It prints *nothing*. Does anyone have an idea as to what might stop this from functioning as expected? -- Nick Wilson http://performancing.com/user/1 -- PHP General Mailing List (http://www.php.net

[PHP] mhash() without mhash library?

2006-06-28 Thread Nick Wilson
); return urlencode ( $encoded_hmac ); } any thoughts? -- Nick Wilson http://performancing.com/user/1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mhash() without mhash library?

2006-06-28 Thread Nick Wilson
* and then Jochem Maas declared Nick Wilson wrote: hi all, can anyone tell me if it might be possible to do an mhash() without actually having the mhash library installed? for various reasons it's very impracticle to have a compiled version of php running on our production

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-14 Thread Nick Wilson
saving/using them. Much thanks! -- Nick Wilson Tel:+45 3311 2250 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Security Concerns with Uploaded Images:

2006-05-13 Thread Nick Wilson
be spoofed). I'd welcome any thoughts in general on this, but specifically if anyone has experience/knowledge in this area and can point me in the right direction. Many thanks! -- Nick Wilson Tel:+45 3311 2250 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Cannot suppress fsockopen errors

2006-05-10 Thread Nick Wilson
! -- Nick Wilson Tel:+45 3311 2250 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
something to do with relative paths, but even when i try to work with chdir() i still get no joy. I just can't figure out what the issue may be, so any pointers in the right direction would be hugely appreciated. thankyou! -- Nick Wilson Tel:+45 3311 2250 -- PHP General Mailing List

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
* and then Jochem Maas declared Nick Wilson wrote: Hello all, Im having some problems understanding why some requires() are failing. Let me see if i can describe what's going on clearly... I have this: [EMAIL PROTECTED] ls ads/ config.inc db.inc funcs.inc init.inc where ads

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
or stuck in subdir of some other vhost. but thats just me :-) Ordinarily i'd agree. We want to be able to update this set of third party maintained scripts easily though, hence writing a layer to interact with it rather than hack the core code. Hope that all makes sense! thanks -- Nick Wilson

[PHP] Sessions and subdomains issues

2004-12-06 Thread Nick Wilson
Goodmorning all, My application (a third party customized cms) shares sessions across the main site and the two subdomains - or at least it should I have 'php_value session.cookie_domain .mysite.com and'php_value session.cookie_path / all set in htaccess The sesions are stored in a db

[PHP] Atom 2 RSS Script? Anyone got one?

2004-11-14 Thread Nick Wilson
hi all, im all tired out of searching, just cant seem to find a script that will convert atom 0.3 to any rss format. Does anyone have one or know where i can get hold of one? I know about 2rss.com but they insert ads as i understand it so that just wont do :) thanks for any links or help.. --

[PHP] Matching *exact* string?

2004-10-31 Thread Nick Wilson
hello all I am foreach()ing through an array of ip addresses in a 'ban script' and have the following php code: foreach($ips as $ip) { preg_match(/$ip/, $_SERVER[REMOTE_ADDR]); $ban = TRUE; } This is great, but if 127.0.0 were in the ban list (for example) it would still produce a ban as it

Re: [PHP] Re: Matching *exact* string?

2004-10-31 Thread Nick Wilson
* and then Aidan Lister declared I cannot fathom why you would use preg_match for this. This will get an exact match... if ($ip == $_SERVER[REMOTE_ADDR]) { $ban = true; } Ahh.. an oversight. The script has been cobbled together from a previous version that supported partial matches. I'd

Re: [PHP] Re: Matching *exact* string?

2004-10-31 Thread Nick Wilson
* and then Per Jessen declared foreach($ips as $ip) { preg_match(/^$ip$/, $_SERVER[REMOTE_ADDR]); $ban = TRUE; } Great! - found a more sutable way but that's appreciated. Cheers! -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Matching *exact* string?

2004-10-31 Thread Nick Wilson
* and then Daniel Schierbeck declared I'd rather go with something like this: $banned_ips = array('123.123.123.123', '321.321.321.321'); // Banned IPs if (in_array($_SERVER['REMOTE_ADDR'], $banned_ips)) { die('Dude, you\'re banned!'); } But if I were you I'd choose something

Re: [PHP] Re: Matching *exact* string?

2004-10-31 Thread Nick Wilson
* and then Greg Donald declared On Sun, 31 Oct 2004 12:58:04 +0100, Nick Wilson [EMAIL PROTECTED] wrote: I think in_array() sounds like a great solution, wonder if it's faster than comparing each ooe with == ? thanks! Benchmark it both ways and find out. Then post back and tell us

Re: [PHP] About File Paths [unresolved]

2004-10-29 Thread Nick Wilson
* and then Matthew Sims declared If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? Should I use fopen('a_path/relative_to/thescript.php'); or fopen('/usr/var/www/absolute_file_path/thescript.php'); Im not

[PHP] About File Paths

2004-10-28 Thread Nick Wilson
Hi all, If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? Should I use fopen('a_path/relative_to/thescript.php'); or fopen('/usr/var/www/absolute_file_path/thescript.php'); Im not only using this for fopen. So does php work

Re: [PHP] About File Paths

2004-10-28 Thread Nick Wilson
* and then Greg Donald declared On Thu, 28 Oct 2004 18:27:34 +0200, Nick Wilson [EMAIL PROTECTED] wrote: If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? I always assume cron is dumb and provide it with full paths

Re: [PHP] About File Paths [unresolved]

2004-10-28 Thread Nick Wilson
* and then Nick Wilson declared ***bumpety bump*** ;-) If a script is to be called with cron *outside* of the http directory, how should file system paths be handled? Should I use fopen('a_path/relative_to/thescript.php'); or fopen('/usr/var/www/absolute_file_path

[PHP] Protecting Commercial PHP Scripts

2004-10-26 Thread Nick Wilson
Hello all, I was wondering if anyone might have suggestions or useful links on protecting commercial php scripts. I am about to design a system that would be pretty valuable in a very niche market and would not wish the script to be passed on to others once downloaded. Suggestions, discussion

Re: [PHP] Protecting Commercial PHP Scripts

2004-10-26 Thread Nick Wilson
* and then Francisco M. Marzoa Alonso declared I was wondering if anyone might have suggestions or useful links on protecting commercial php scripts. I am about to design a system that would be pretty valuable in a very niche market and would not wish the script to be passed on to

[PHP] Best Functions for Checking Remote File last modified?

2004-10-23 Thread Nick Wilson
Hello, I need to connect to a remote http server and pick up a file *only* if it has been modified since i last did this. The file is in csv format (not tht i think that matters?) and is http password protected. Which functions should I look at for acheiving this please? Thanks very much! --

[PHP] urlencode() and newlines?

2004-10-16 Thread Nick Wilson
hello all, For reasons beyond my immediate control i have to keep some strings of text in a text *new line delimited* text file. I also have to urlencode those strings for use in my script. Like this: ## text file This is a line\nThis is another line This is another string\nwith some

Re: [PHP] urlencode() and newlines?

2004-10-16 Thread Nick Wilson
* and then Marek Kilimajer declared Nick Wilson wrote: hello all, For reasons beyond my immediate control i have to keep some strings of text in a text *new line delimited* text file. I also have to urlencode those strings for use in my script. Like this: ## text file

Re: [PHP] urlencode() and newlines?

2004-10-16 Thread Nick Wilson
* and then Marek Kilimajer declared echo urlencode(This is a line\nThis is another line); Yep, i can see that it's encoded but when the data is POSTed to a form, it does not come out as a newline... Are you sure the other side accepts, does not remove newlines? Create a form

Re: [PHP] Encoding Question [NOT RESOVED]

2004-10-11 Thread Nick Wilson
* and then Nick Wilson declared that one is using rawurlencode() but it's just as bad with urlencode - How *should* I be doing this? is this how you tried to do it? $userAgent = Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0); curl_setopt($ch, CURLOPT_USERAGENT

[PHP] Finding one line in a Variable?

2004-10-11 Thread Nick Wilson
Hello all, I have to find and put one line of an html file in a variable. I already have the entire html file stored in a variable like this: $myHTML=htmlheadblah blah blah; - Grabbed using cURL The particular line I want will *always* contain the string the_identifying_string So the line

Re: [PHP] Finding one line in a Variable?

2004-10-11 Thread Nick Wilson
* and then Minuk Choi declared If you don't mind NOT using regex or regular expression searching commands, you can try it this way. Assuming that there is a carriage break(e.g. \r\n if windows, and I'm assuming the HTML file was written in windows, otherwise, just \n for snip..

[PHP] Encoding Question for getting pages

2004-10-11 Thread Nick Wilson
Hello, If im using cURL to grab pages, i like to set a $referer and $userAgent string. Easy enough right? If I do not encode the referer and ua strings my cURL functions do not seem to work, BUT, if I *do* encode them, they come out looking like this in the server logs..

Re: [PHP] Encoding Question for getting pages

2004-10-11 Thread Nick Wilson
* and then Matt M. declared Mozilla%2F4.0%20%28compatible%3B%20MSIE%206.0%3B%20Windows%20NT%205.1%0A that one is using rawurlencode() but it's just as bad with urlencode - How *should* I be doing this? is this how you tried to do it? $userAgent = Mozilla/4.0 (compatible; MSIE

[PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
hi all, Im getting an http 411 error when trying to post data with php's cURL functions. The spec says ***The message for this error code is Length Required. The server refuses to accept the request without a defined Content- Length.*** Im confused on 2 points: * Is it the server i am

Re: [PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
* and then Marek Kilimajer declared * How to resolve this? header('Content-Length: ' . strlen($data_you_are_posting)); Ok, im with you Marek but how/where do i put it in my curl function? Not with CURL_POSTFIELDS for sure.. i've been looking through the options in the manual and dont see

Re: [PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
* and then Nick Wilson declared * and then Marek Kilimajer declared * How to resolve this? header('Content-Length: ' . strlen($data_you_are_posting)); Ok, im with you Marek but how/where do i put it in my curl function? Not with CURL_POSTFIELDS for sure.. i've been looking

Re: [PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
* and then Marek Kilimajer declared Opps! CURLOPT_HTTPHEADER I go play with it now ;-) Sorry, I got it mixed :) But you figured it out. do you know if the lenght includes the args? like this strlen(val=$varval2=$var2); or strlen($var . $var2=; ? cheers marek -- Nick W

Re: [PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
* and then Marek Kilimajer declared Nick Wilson wrote: * and then Marek Kilimajer declared Opps! CURLOPT_HTTPHEADER I go play with it now ;-) Sorry, I got it mixed :) But you figured it out. do you know if the lenght includes the args? like this strlen(val=$varval2

Re: [PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
* and then Marek Kilimajer declared CURLOPT_HTTPHEADER - An array of HTTP header fields to set. Marek, im sure you dont need to know this, but i think it's funny so maybe you will, i just went to bed, im now sitting here er.. without much on at the PC cos i just realized the same thing! -

Re: [PHP] http 411 error with cURL

2004-10-09 Thread Nick Wilson
* and then Nick Wilson declared * and then Marek Kilimajer declared CURLOPT_HTTPHEADER - An array of HTTP header fields to set. ahhh [EMAIL PROTECTED] it! that dont work and niether does this: curl_setopt($ch, CURLOPT_HTTPHEADERS, array(Content-Length: $postL)); im off to bed

[PHP] Creating a Sequence from Array

2004-10-08 Thread Nick Wilson
hello all, I have an array like this: array ( 1 = array(123, 345, 454), 2 = array(8854, 393, 4947, 77, 3343), 3 = array(393, 33) ); I need to create an array sequence from that that would look like this: array ( '1:123', '2:8854',

Re: [PHP] Help with Array Sorting Please

2004-10-08 Thread Nick Wilson
* and then Ford, Mike declared php 543 = 2 432 = 2 // like here, more 2's than 1's see? 566 = 2 568 = 2 999 = 3 878 = 3 444 = 3 That's not terribly good, as you are using the unknowns (ip addresses) as keys to the knowns (machine IDs). It would be better keying off the

Re: [PHP] Help with Array Sorting Please

2004-10-08 Thread Nick Wilson
* and then Ford, Mike declared 543 = 2 432 = 2 // like here, more 2's than 1's see? 566 = 2 568 = 2 999 = 3 878 = 3 444 = 3 That's not terribly good, as you are using the unknowns (ip addresses) as keys to the knowns (machine IDs). It would be better keying off the machine

Re: [PHP] Help with Array Sorting Please

2004-10-08 Thread Nick Wilson
* and then Nick Wilson declared * and then Ford, Mike declared php sorry about the dupes everyone, i changed router today and resent a whole bunch of stuff b4 i realized it wasnt goint out... -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Re: Creating a Sequence from Array

2004-10-08 Thread Nick Wilson
* and then Tim Van Wassenhove declared I do have some code to show you but im afraid ive been going at it all the wrong way so im not sure it's of any use. Do you have a clue what your code is doing? Or did you just come up with it? What is the use of writing code that you don't

Re: [PHP] Help with Array Sorting Please

2004-10-08 Thread Nick Wilson
* and then M Saleh EG declared i'd recommand u to use trees if u got complicated data arrays. use tree datascturcutres... u could sort n do watever then or jus queues or stacks depending on what u wanna do Try PEAR Tree class it might help Hope that was usefull. *very*

[PHP] Muti-Dimensional Array Help Please

2004-10-07 Thread Nick Wilson
hello all, I have some text files in a directory that contain newline delimited IP addresses. Here is what i would like to do with them, and what i have achieved so far: I read the files into a multi-dimensional array like: (pseudo code) array(IP_blocks) = ( File_number[1] = array('ip1',

Re: [PHP] Re: Muti-Dimensional Array Help Please

2004-10-07 Thread Nick Wilson
* and then M. Sokolewicz declared However, if it does matter, then I suggest a different way. This would Yes, it does matter, a *lot* ;-) I have to hit each machine in order, choosing an IP from that machine and using it do 'do_stuff()' order them by their 2nd index, not the first

Re: [PHP] Muti-Dimensional Array Help Please

2004-10-07 Thread Nick Wilson
* and then Ed Lazor declared It looks like you're hading in the right direction. You've grabbed an array of each file. Then cycle through that array and read data from each file. The fread function will allow you to pull data from each file line by line, so you can store each line in an

[PHP] Help with Array Sorting Please

2004-10-07 Thread Nick Wilson
Hi, If you scroll up the list you'll see another thread of mine, this is related. The reason for a new thread is that i've made a lot of progress but the old was getting really confusing.. Here's the scoop: I have an array like this: 123 = 1 // each value may have few or many duplicate

Re: [PHP] php script run by cron job

2004-10-01 Thread Nick Wilson
* and then Merlin declared Hi there, I already managed it to run a php script by cron, but now I cant remember the exact syntax. Somehow it does not work. /var/log/messages tells me that cron has called the line, but it never runs. I did try to run the line without cron and it

[PHP] cURL and Proxy Servers

2004-09-30 Thread Nick Wilson
Hello everyone, I'm using cURL and have a question about this line (part of a function) curl_setopt($ch, CURLOPT_PROXY, $proxy2use); I know that *after* I curl_exec() i can find out if the proxy resolved or not with curl_errno() (it would return 5) but it seems that if it does fail to resolve,

[PHP] Re: cURL and Proxy Servers

2004-09-30 Thread Nick Wilson
* and then Manuel Lemos declared You may want to try this HTTP client class instead. It supports requests via proxies and does not use Curl. http://www.phpclasses.org/httpclient Hmmm.. good point Manuel, i have seen the class, in fact it was the original way i /was/ going to build the

[PHP] Escaping Regex Chars with addcslashes()

2004-09-29 Thread Nick Wilson
Hi all, If i want to find a url on a page, there are some chars i need to escape right? like '/' and '?' do i also need to escape '.'? Are there any other things that might pop up in a url that I can escape with addcslashes()? Much thanks -- Nick W -- PHP General Mailing List

Re: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Nick Wilson
* and then Niklas Ojala declared I am looking for a class or some samples that would read a table from mysql and store it in an array variable, so that it will be avilable to other parts of the page without having to get it from the database again. So I would like to only get the table

Re: [PHP] Escaping Regex Chars with addcslashes()

2004-09-29 Thread Nick Wilson
* and then Marek Kilimajer declared If i want to find a url on a page, there are some chars i need to escape right? like '/' and '?' do i also need to escape '.'? Are there any other things that might pop up in a url that I can escape with addcslashes()? Don't use posix regexp,

Re: [PHP] Testing Response of A Proxy with PHP?

2004-09-28 Thread Nick Wilson
* and then Marek Kilimajer declared oookay... i think i understand the page, but how would i imlement that $fp = fsockopen (proxy.server.net, 8080, $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br\n; } else { fputs ($fp, OPTIONS * HTTP/1.0\r\nMax-Forwards: 0\r\n\r\n);

[PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
hi everyone, I have a simplified bit of code below: ?php foreach($someArray as $someVal) { //do some stuff } ? What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: ?php $count=0; foreach($someArray as

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Pablo Gosse declared if ($count%20 == 0) http://ca3.php.net/manual/en/language.operators.arithmetic.php in the manual (look for Modulus). Yes, thankyou very much, got a bunch of similar replys in my personal inbox to ;-) And there was me sifting through the math functions!

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Marek Kilimajer declared % operator: http://www.php.net/operators Thanks EVERYONE, i feel like i should have known that, but i didnt, my thanks! - and the guy that suggested the other way? that was how i was trying to do it ;-) -- Nick W -- PHP General Mailing List

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Jesse Castro declared [snip] ?php $count=0; foreach($someArray as $someVal) { if($count is divisible by 20 exactly) { // do some stuff } //do some stuff } ? [/snip] if($count is divisible by 20 exactly) Can be written as If ($count %20 == 0)

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Jason Davidson declared I see lots of references to modulus, which works fantastic.. but how abut just testing if its equal to 20, then there isnt that extra arthmitc call.. this is just another way to do the same thing.. take your pick.. unless someone can see a bad reason for

[PHP] Getting Header info with PHP?

2004-09-26 Thread Nick Wilson
Hi everyone, Can anyone tell me which functions/areas i need to look at to do the following? * I need to check a proxy server. * I want to have the proxy fetch a php page at my site * my php page should show me *every* header the proxy server sends Is that possible? much thanks, and

Re: [PHP] Post vars without using html form

2004-09-26 Thread Nick Wilson
* and then Pahlevanzadeh Mohsen declared You must use Socket Programming. PHP have been supported socket programming. You can choose port 80 then use its functions. There is an easier way. Use the cURL functions: very simple and doing a search for curl php tutorial or similar will help

[PHP] PHP Counter?

2004-09-26 Thread Nick Wilson
Hi all, I have a script that at the present just outputs '$count .'br /'' after each iteration of a foreach() loop. I have set implicit_flush so that this works. That's clearly monkey poo though eh? :-) Do I have to get into unkown waters and try and make PHP talk to JS to achieve a kind of

[PHP] Testing Response of A Proxy with PHP?

2004-09-26 Thread Nick Wilson
hi again all, I cant find any functions that might help me test the response of a proxy server b4 attempting to use it. Do i need to use exec() with ping? Anyone know how to do that? (if that's the case...) mucho grassy arse.. -- Nick W -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Testing Response of A Proxy with PHP?

2004-09-26 Thread Nick Wilson
* and then Marek Kilimajer declared I cant find any functions that might help me test the response of a proxy server b4 attempting to use it. Do i need to use exec() with ping? Anyone know how to do that? (if that's the case...) What kind of response? If the server is alive, if the

Re: [PHP] Testing Response of A Proxy with PHP?

2004-09-26 Thread Nick Wilson
* and then Marek Kilimajer declared OPTIONS * HTTP/1.0 More at http://www.freesoft.org/CIE/RFC/2068/63.htm oookay... i think i understand the page, but how would i imlement that and what would be the difference in that and just pinging the server to see if it's responding? Thanks for

Re: [PHP] Testing Response of A Proxy with PHP?

2004-09-26 Thread Nick Wilson
* and then Marek Kilimajer declared oookay... i think i understand the page, but how would i imlement that $fp = fsockopen (proxy.server.net, 8080, $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br\n; } else { fputs ($fp, OPTIONS * HTTP/1.0\r\nMax-Forwards: 0\r\n\r\n);

[PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
Hi all, Im trying to delete a line from a file after having first read the line. The file contains a list or urls, one per new line: like this: urls.txt http://example.com/somedir/ http://www.example.com/page.php?name=Nick+W Here's what I have so far: ?php $file = 'urls.txt'; $f =

Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
* and then Nick Wilson declared Hi all, Im trying to delete a line from a file after having first read the line. The file contains a list or urls, one per new line: like this: BTW, reading the file into an array, shifting off the first element and rewriting isnt a good option for me

Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
* and then John Nichel declared John Holmes wrote: You can't just remove part of a file like you remove part of a string. You'll need to read (eventually) the entire file and only write back what you want to keep. Now, you said this could be a very large file, so you don't want to

Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
* and then John Holmes declared Should the db go like this? db_urls url_id | user_id | project_id | url db_user user_id | name | whatever db_project project_id | user_id Wow, now i've written it down it seems clearer ;) you guys reckon that's the right kind of schema (based

[PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Nick Wilson
Anyone else getting these infuriating italian messages about some muppet that doesnt exist? 'desintione non existente'? I've written to [EMAIL PROTECTED] but no joy, everytime i post on the php list i get half a dozen of the damn things... -- Nick W -- PHP General Mailing List

Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Nick Wilson
* and then Gryffyn, Trevor declared It appears to be a user not found type error..'desintione non I must say, im glad it's not just me hehe! I was beginning to think it was just me. I've been away from the list (never a big participant...) for a while but stuff like that used got sorted

[PHP] Delete Line from File?

2004-09-13 Thread Nick Wilson
Whats the easiest/best way to do that with php? just replace the line with ''? -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Delete Line from File?

2004-09-13 Thread Nick Wilson
* and then John Holmes declared Whats the easiest/best way to do that with php? just replace the line with ''? Yes, basically. You have to read the file, replace the part you don't want with an empty string and then re-write the file. If the file is small and you're using file() to

[PHP] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Nick Wilson
Hi all, Say i have a php script like this: ?php print(html_head()); // do loads of time taking stuff print(html_footer()); ? How come I dont see the html header (it's just a function that returns a string with the html up till body) before the entire script has run? This goes against my

Re: [PHP] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Nick Wilson
* and then Jason Davidson declared i prefer to escape from php inside my header fucntion, and just not print it.. eg. function header() { ? html head title ? } Yes, i remember now, thanks ;-) I've been using Smarty (smarty.php.net) for so long now that i've forgotten

Re: [PHP] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Nick Wilson
* and then John Holmes declared How come I dont see the html header (it's just a function that returns a string with the html up till body) before the entire script has run? This goes against my understanding, why might this be and what might i use to get some output before the script

Re: [PHP] Re: Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Nick Wilson
* and then M. Sokolewicz declared How come I dont see the html header (it's just a function that returns a string with the html up till body) before the entire script has run? This goes against my understanding, why might this be and what might i use to get some output before the script

[PHP] cURL Help - Posting a Form

2004-09-11 Thread Nick Wilson
hi all, Im trying to get the following php code to output the 'success'/'failure' page from posting a form to a site. The problem is that there is no output at all, so i must be doing somthing silly, but cant work out what! ;-) ## Code $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,

Re: [PHP] cURL Help - Posting a Form

2004-09-11 Thread Nick Wilson
* and then Nick Wilson declared hi all, Im trying to get the following php code to output the 'success'/'failure' page from posting a form to a site. The problem is H... it helps if you are submitting to the 'action' url of course sigh -- Nick W -- PHP General Mailing

[PHP] Parsing HTML files

2004-09-10 Thread Nick Wilson
Hi all, I was wondering if any classes/functions could help me with this little challenge, (im hopeless at regex ;-) input type=hidden name=id value=593 / I want to extract the value of 'id' from a webpage. Any simple way to do this or am I down to sweating of the regex functions? Much

Re: [PHP] Parsing HTML files

2004-09-10 Thread Nick Wilson
* and then Abdul-Wahid Paterson declared No easy way of doing it, regex somthing like: $id = preg_replace(/.*input.*name=\id\ value=\[0-9]+\ \//, $1, $string); where $string is a line from your input'd HTML page OK, thanks abdul, much appreciated.. -- Nick W -- PHP General

Re: [PHP] !!Urgent .. Session Problem

2004-09-05 Thread Nick Wilson
* and then Dre declared I'm sorry about the capital letters and nop I'm not prepending any files at all Can I get a look at the file? -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] !!Urgent .. Session Problem

2004-09-04 Thread Nick Wilson
* and then Dre declared Warning: session_start(): open(/tmp\sess_2984f6d378560d0882f37728dbe1defc, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\ELBA\logme_in.php on line 3 Check your php.ini for session.save_path= Im not sure where the temp

Re: [PHP] !!Urgent .. Session Problem

2004-09-04 Thread Nick Wilson
* and then Dre declared first of all thanks for ur reply you're most welcome there are no white spaces before the ?php in my .php file and I do have ONLY one php.ini file in the whole system drive (I'm sure of this) See the other reply, that sounds like it.. i was unaware of this...

Re: [PHP] !!Urgent .. Session Problem

2004-09-04 Thread Nick Wilson
* and then M. Sokolewicz declared also, please remember you need to restart your webserver to actually have PHP re-read the php.ini file. If you don't, then nothing will change in run-time, even though the php.ini file might have changed *a lot* heheheh! that's most probably it! --

Re: [PHP] Regex for Validating URL

2004-09-03 Thread Nick Wilson
* and then Jim Grill declared Guys, while we may be able to debate what is rude, what is blunt, what should have been said, what was said, the facts are clear. He apologized, and I think its time to lest this debate rest for now. While I would admit that harshness runs rampid on

Re: [PHP] Re: File Transfer

2004-09-03 Thread Nick Wilson
* and then Nadim Attari declared This gonna help: http://www.php.net/ftp I think you could also use the cURL functions. But ftp seems the way to go... -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   5   >