| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Comments:
<0> but I would like to have my script executed *after* the included/required script <0> is there any way to do this, without manually editing the script being included and commenting-out all exits? <1> people, how to send HTTP header to a remote machine? <0> you mean from the php script? <1> sure <0> check "header" on www.php.net <1> header() sends HTTP header back to the machine, which has accessed the script <1> i need to send it to another remote server <0> ergh <0> like: <1> e.g. i've got 3 machines: Workstation A, which accesses the WebServer B, containing the php script. The WebServer B then should access the WebServer C, sending the HTTP header <0> client B communicates with server A, gets the output from your script and sens a http header to Server C? <0> you can't <2> Anyone know any good way for empty form values in a SQL query to get NULL instead of ''? Cause i keep getting Incorrect integer value: '' for column 've_year' at row 1| (ve_year = '') <0> not from php
<1> :( <1> sd <1> sad <0> php is a server-based script <0> I think JavaScript might help <0> because you obviously have to execute some code on the Workstation <1> well, the task is much more simple <1> the server C generates JPEG images <0> aye <1> and is limited to some 20 connections <0> aye <1> the server B is to collect the images from the server C <0> ok <0> where's the need for Workstation A to send the header to C? <1> so that the workstations WS[1..80] can access the server B to get this images <1> the server C is p***word protected <3> how can i add 8 hours to a timestamp? <0> ahh... <1> so the server B has to first send the username/p***word to the server C to establish connection <0> Ira_: $timestamp += 8 * 60 * 60 * 1000 AFAIK <1> to get the images <0> ok, still no need for Workstation A to send the header <4> q <1> nope <0> o...k <1> the headers are being sent by the Server B <0> let's see <1> to the Server C <0> aah <3> rysiek - isn't there a function that will do like somefun($timestamp,"+ 8 hours"); <0> ok, so what exactly do you need? <5> lra_: strtotime("+8 hours",$original_time); <0> Ira_: you can write one :) <1> rysiek: what exactly do i need? <0> ok, let me get this straight: <0> 1. Workstation A wants some images <1> rysiek: i want the Server B to send username/p***word to the Server C <1> 1. yes <2> http://www.nomorepasting.com/paste.php?pasteID=57441 <0> ok, so you want the SERVER to send the header? <2> please help <6> if you do a header redirect, how to send a referrer? <1> rysiek: sure <0> aah, I thought you wanted the workstation to do that :) <0> hmmm <0> a header won't do here <6> hmm <6> is it possible to do with php <1> oh.... what should i use then? <0> as headers get sent upon cunnection <0> wait, searching php.net ;) <6> can't you just forge a referrer header <1> rnnnnnnn: you need to convert the string to integer <6> they say header("Referer: blah"); but that doesn't work <0> it's the php script connectiong to C, not C connectiong to php script <0> so headers won't do, IMHO <2> noppo: but i would like the empty strings to be NULL, not 0 <2> its better to have NULL cols in the database then 0's <1> rnnnnnnn: if ($string === '0') /* insert NULL into the field */ <0> noppo: maybe you could use fopen? <0> like:
<0> A communicates with B and logs in <2> noppo, then how do i insert null in a field? <0> in the log-in script, you fire: <0> fopen('http://server.c.address/some.php.script?user=<user>&pswd=<pswd>', 'r') <1> rnnnnnnn: INSERT INTO t1 SET ve_year = NULL maybe? <0> this way the script from B can initiate the connection with C <0> C checks whether the login data are OK <1> rysiek: let me try <0> and returns the image <2> noppo, yeah, but how do you get that from '' to NULL without having 10 diffrent querys, thats the whole question! <0> that's just a stub of a solution <7> is there any kind of loop you can write that works similar to the implode( ) function that doesnt duplicate any code of use an if( ) per iteration? <7> any code or use* <0> noppo: here's the code example from php.net: <0> $handle = fopen("ftp://uzytkownik:haslo@przyklad.com/jakisplik.txt", "w"); <1> rysiek: the Server C has some cgi interface, which can be accessed by using the HTTP authentication only <0> **** <0> you don't have control/admin provs on C? <0> :/ <0> lemme think <1> rysiek: nope <1> rnnnnnnn: convert the variable before making the query <0> noppo: let's get an abstraction layer lower on the ladder :) <0> fsockopen <1> rysiek: the Server B has PHP 4.4.0 installed <3> in a tracert - do the 3 numbers mean the time for each hop? <2> noppo, if ($_POST['year'] == '' $_POST['year'] = 'NULL', but what if it isnt empty? then i need the '! <0> noppo: fsockopen('http://your.c.server/path/to/file.php', 80) <0> and now - you have to get exact info about HTTP headers, esp. concerning authentication <8> $query2 = @mysql_query("DELETE FROM users where pokerid = '$id' LIMIT 1") <-is that valid syntax? <0> because you will have to write to this open socket in raw string <0> no header() here to help you :/ <5> sym0_: Try it and see what mysql yields back to you. :) <8> lol <9> which is the easiest way to parse a string like this: "blabla{this_is_what_I_want}blabla"... I tried functions like parse_str and explode, but they won't bring me forward :-) does somebody knows a good tutorial? (I don't need an XML parser - search engines seems to be full of them) <10> <offtopic>hi, If I want to set a form on my website that people use to send message to protest against patents that sends email to some concerned parties, would this be illegal or considered spam?</offtopic> <11> How do i disable Frame Support on Firefox? <0> munzir: I think yes :/ <0> munzir: unless it's one maiil at a time <0> and some good way to isable the use of robots/automated processes by users <0> ok, so nobody has an idea on the exit() problem? :/ <12> Hmm <12> Can somebody help me use exec()? When I'm calling it like "exec('blah', array(), &$retval)" I get "Fatal error: Only variables can be p***ed by reference in /home/ATLANTIS/rschmid/projects/dialog-center/php/formularparser/HTMLForm.cl***.php on line 981" <13> hi, how to run command as root user with php? <0> you would have to run apache as root, or have the command suid root set <0> AFAIK <13> rysiek: thx <0> nop <12> Okay <12> both have to be p***wed as reference <13> how to set suid for command? <14> how can I remove \n from a string in php? <7> str_replace( "\n", "", $str ); <14> hmm that easy <7> yep <14> mareks: ok thx, I could have looked that up of course ;) <7> $str = str_replace( "\n", "", $str ); <7> obviously, you need to set $str to what str_replace( ) returns... <14> I understand <7> str_replace( ) wont permanently alter the input var <14> thanks <7> sure <15> Hi. If I have a SQL query which returns me many results and I want to display them on many pages. What is the best way to do this? do a "SELECT Count(*) From ..." then limit the selection for each pages or some other way? <14> you can do a LIMIT in the query <15> I ***ume that the result from the first select will be cached DB server? <14> SELECT * LIMIT 1 <7> "SELECT * FROM databasename LIMIT 0, 10" would show results 1 - 10 <15> even if it's are relatively complex query <7> "SELECT * FROM databasename LIMIT 5, 10" would show results 5 - 10 <16> then you can LIMIT 10,10, 20,10, 30,10, blah...
Return to
#php or Go to some related
logs:
#gimp ifplugd Debian Etch Howto #perl no winkey in glx ubuntu xgl twinview xinerama fc3 truecrypt not refreshing package information in ubuntu update manager #openzaurus perl Mechanize add-header #debian
|
|