| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<0> Jymmm: its people like you that are the reason i sometimes hate irc. <1> and if you have a problem with it, get the americans to invade and search for non-existent WMD's <2> Gimp_: Nobody is keeping you here <0> people who think that just because its "online" and not direct or anything, then they can go ahead and bully others, and do things for absolutely no reasons, and who think they're the king of all worlds. <1> well, if you didnt try do that exploit just then, you wouldnt be in this situation <1> suffer the consequences of your actions... since its of no bad consequence to Jymmm if you dislike him! <0> i didn't say anything about me not suffering consequences for doing that just now <0> im just saying that he shouldn't go saying i was doing it before that when i wasn't. <2> 20:22:18] <0> ^Artnez: i have a script that does that... except its not by accedent... and it changes the from email, subject, and message everytime... <2> [20:22:24] <0> *cough* mail bomb *cough* <2> [20:22:30] <0> great for people who piss you off! <2> [20:22:46] <0> also fun because i can actually fill a gmail account in about 4 hours. <0> Jymmm: that was an experiment that i did not plan to, nor ever use on someone other than an account of my own making. <2> Gimp_: Oh well, you talk alot of smack, and it's now biting you on the ***. <0> the third line there, i was being sarcastic, and most of the people that i was talking with reconised that. <0> Jymmm: i don't feel anything biting me in the ***.
<0> on* <1> ok people, calm down now... kiss and make up... well, dont kiss, you're both guys >_> <0> Vylen: seriously, you think of anything other than *** over there? :p <1> i need something to get my mind off the calculus i just did for the past few hours :P <0> heh <0> calculus is fun though! <1> my hand hurts ;_; <0> haha <0> anyways <1> well, im gonna go play with my dog.. he needs a bit of attention.... <0> Jymmm: truce? (but you can go ahead and kick me for using that exploit there) <3> hello ... <0> babo: goodbye <3> can you answer a question ? <0> babo: not unless you ask it. <3> Gimp_: so I'm using the move_uploaded_file function, I store my pic on my hosts C:/PHP/upload/ folder. But I need to write a script that will send the pic to a client webpage ... how do I reference it properly ... I've tried just using a <img src='C:/php/upload/picture_name.jpg' ... but no luck ' <0> uhh <0> schwaaa? <0> that makes no sense <0> you're trying to create a script that will move a picture from C:/PHP/upload/ to a different folder? <3> Gimp_: no - I'm just trying to let my client see the pic when they access my webpage ... picture_page.php <0> uhh <0> you don't need to do any of that.... <0> just put the image in the same folder as picture_page.php, and then just use a regular <img src="image.jpg"> <3> Gimp_: I can't upload the pic to my folder ... it has to go to the temp folder <3> Gimp_: oh wait, I get you know - I think I'm doing it wrong. I should copy the thing out of temp and store it locally with move_uploaded_file ... then reference it from there after that ... oops .. <0> yes. <0> move_uploaded_file is for taking it out of temp <0> you use that for moving it out of the tmp folder, and into a local directory <4> babo: <img src='C:/php/uplo... would try and get it off the clients computer at that location <4> actually it wouldn't, but you get my point <3> aidan: yeah, I kinda figured as much ... I'll post a line or two of code here if it's ok ? <3> $uploaddir = '/var/www/uploads/'; <3> $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); <3> move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile) <0> yup <0> :p <3> I took that off php.net ... <0> heh <0> yah <0> uploaddir is the dir you want the upload to go into <3> so how then should I reference the pic in my html ? <3> yeah, I don't have any problem uploading the file <0> well, make the uploaddir the same folder as your webpage <0> then just reference to the uploaded and moved image. <3> Gimp_: can't - my host sets the upload_tmp_dir value in php.ini <0> uhh <0> babo: what? <0> noo <0> i meant in that code you just posted <0> the tmp dir, stays the same <0> the uploaddir <0> is the dir the image will be moved to <0> from the tmp dir. <3> Gimp_: oh ... ok ... so the $uploaddir isn't the same as the host's C:\PHP\upload\ directory ... but rather - it's my local upload dir that should be stated there ? <0> umm <0> it should be the directory on the web server <0> that your website files are located in <3> So I kinda figured it worked like this ... the computer takes the uploaded pic from memory, then php transfers it to the upload temp dir on the servers C drive. <3> and stores it there <0> what?
<0> it works like this <0> you upload the image through a form -> it gets put into the temp folder on the server -> move_uploaded_file() takes that, and moves it into the proper directory on the server <5> heelo <5> hello* <0> http://ca3.php.net/move_uploaded_file <0> Xrogaan: hey <3> oh ok ... then ... I'd mixed up the uploaded directories with one another ... cheers. <0> heh <0> babo: yah. <5> i have an error : http://wall.wouf.biz/?voir;2021 <5> it is frustrating <5> do you can help me ? :p <0> heh <0> Xrogaan: im lookin <0> Xrogaan: is that a file thats included in other files? <0> if yes, try replacing include('configg9.php') with include_once('configg9.php') <5> mh <0> other than that, im not sure <0> but thats a WEIRD way to do whatever you're doing <5> "include_once" make no effect <0> i have no idea <5> yep <0> Xrogaan: but some advice, for your coding style, try to use more lines. "{" and "}" should have its own line, and you should start a new line when you end a command ";" <0> its really hard to read that code, when you put it all packed into like 10 lines <5> in truth, it is the code of friends (nodark), but I had the same problem in the past <3> Gimp_: ok then, new problem ... my scripts are telling me that I don't have the permissions to upload to ./uploads in my php directory. <0> babo: make sure that permissions are set to 777 for that directory <3> Gimp_: I can't set them past 666 ... plus - isn't 777 unnecessary ... why would I need to give world the opportunity to execute files on my server <0> heh <0> 774 would work too <0> you BLAG <3> Gimp_: what's a BLAG ? <0> sorry, someone kicked me from a different chan <0> you just need to give php permission to read and write in the folder. <3> Gimp_: it already has 666 <0> well, then it should work. <0> i don't know <0> i think it needs 774 <6> how would you do a dynamic form post that the user can't mess with but that the browser sees the result of? <0> schwaaaa? <6> for example, I need to collect info form a form post, enter it in the DB, add some stuff to the POST and then POST it to paypal, with out the user being able to modify the second FORM <3> Gimp_: hmmm .... I had this same problem yesterday and I changed around the folders ... the only thing that worked without error was when I put C:\PHP\uploaddir in the $uploaddir ... but that seems to be the wrong thing to do <0> is the computer running windows? <6> there is a template from paypal that lets the user modify the second form <0> <input type="hidden" <6> ya, but users know how to change those <3> Gimp_: why would I need permission of 7 just to write to / read from a folder ? <0> thats why you put in a $_SERVER vars that checks the page they came from, and if its not your page, tell em to get out. <0> babo: beats me. <0> maybe php executes something to move it? <3> thos9: there is no way you can verify anything that comes from the user, be through POST or GET ... trust no-one <3> It sounds like your script is generated on your server though ... <6> Gimp_: ya, i just thought it might be possible to reduce the ways <6> seems like I should be able to take in a POST and then repost it without having to make an actual form on the page that the user can potentially edit <6> I tried opening a socket to the post server but then I'm not sure what to do with that once the stuff is posted to it <3> thos9: there are a couple of things you can do ... you can put a form type='hidden' , you can check the refferrer, you can check user-agent to make sure it was sent by a browser, or you can put an encrypted .net style viewstate on it ... <3> all of these are reasonably easy to overcome though ... <0> or you could send the information through a socket... <0> :p <0> thats not easy to overcome... <3> you'd want to know what you are doing ... <6> but then I would need to handle the html that coms back via the socket <0> haha <6> heheh <0> thos9: meh, thats what you have to deal wih <6> is there some way to construct a POST taht gets executed by the browser similarly to the header(Location) command for GET <0> thos9: yup. <6> how? <0> thos9: http://www.php.net/header <0> i don't know off the top of my head. <0> i know it can be done though <0> you can send post vars through a header i think <0> although i think it, again, uses sockets <0> sets the header on the socket, then sends it across
Return to
#php or Go to some related
logs:
#math #css vhcs sqwebmail ntp-server debian unmet dependencies #php #ubuntu replacing string with variable sed
fuchsto ubuntu can“t acces tty: job control #perl
|
|