PHP: Write to file on harddrive of client pc

PHP: Write to file on harddrive of client pc

Page 1 of 1

5 Replies - 9340 Views - Last Post: 26 July 2009 - 10:19 AM Rate Topic: -----

#1 bammo10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 23-July 09

PHP: Write to file on harddrive of client pc

Posted 26 July 2009 - 04:54 AM

Hello, I have searched the whole internet without any result.

But is there ANY[b] way to read/write/create a file on a pc drive and not the server's drive??

Thank you in advance Chris
Is This A Good Question/Topic? 0
  • +

Replies To: PHP: Write to file on harddrive of client pc

#2 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: PHP: Write to file on harddrive of client pc

Posted 26 July 2009 - 05:03 AM

No there's not unless using some sort of plug-in in the browser which has to be granted by the user. :)

EDIT:
And then I still, actually, don't know if it's possible. Why do you want to do this? :S

View Postbammo10, on 26 Jul, 2009 - 01:54 PM, said:

Hello, I have searched the whole internet without any result.

But is there ANY[b] way to read/write/create a file on a pc drive and not the server's drive??

Thank you in advance Chris

This post has been edited by Wimpy: 26 July 2009 - 05:04 AM

Was This Post Helpful? 0
  • +
  • -

#3 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2834
  • View blog
  • Posts: 9,738
  • Joined: 08-August 08

Re: PHP: Write to file on harddrive of client pc

Posted 26 July 2009 - 06:03 AM

You can let the user download a file to their hard drive. Anything thad didn't require active user approval/action would be a serious security flaw.
Was This Post Helpful? 0
  • +
  • -

#4 bammo10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 23-July 09

Re: PHP: Write to file on harddrive of client pc

Posted 26 July 2009 - 09:08 AM

View PostCTphpnwb, on 26 Jul, 2009 - 05:03 AM, said:

You can let the user download a file to their hard drive. Anything thad didn't require active user approval/action would be a serious security flaw.

Thx that's a good idea, downloading a file.
Because the idea is as following
I have made an application and to be sure the user registered I want to check if a file exists.

But could it be possible to do it on the background?? Like nobody will know its downloading?

Thank you in advance.

Chris from the netherlands

This post has been edited by bammo10: 26 July 2009 - 09:12 AM

Was This Post Helpful? 0
  • +
  • -

#5 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4187
  • View blog
  • Posts: 11,845
  • Joined: 18-April 07

Re: PHP: Write to file on harddrive of client pc

Posted 26 July 2009 - 09:20 AM

This is where cookies would be the solution you need. Now not everyone accepts cookies, but cookies is a file that you can put on a user's pc to store site specific information. You can put a cookie on their machine and when they return check for that cookie file. If it is not detected, force them to relogin/register.

You can read all about them at the PHP cookies manual page.

But as far as writing and reading files to the user's pc in the background, as already mentioned, it would be a security issue and thus PHP doesn't allow it. The only way you can get a file on their pc is through cookies and if they accept them (which most do by default).

I hope this helps the situation! :)
Was This Post Helpful? 0
  • +
  • -

#6 bammo10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 23-July 09

Re: PHP: Write to file on harddrive of client pc

Posted 26 July 2009 - 10:19 AM

View PostMartyr2, on 26 Jul, 2009 - 08:20 AM, said:

This is where cookies would be the solution you need. Now not everyone accepts cookies, but cookies is a file that you can put on a user's pc to store site specific information. You can put a cookie on their machine and when they return check for that cookie file. If it is not detected, force them to relogin/register.

You can read all about them at the PHP cookies manual page.

But as far as writing and reading files to the user's pc in the background, as already mentioned, it would be a security issue and thus PHP doesn't allow it. The only way you can get a file on their pc is through cookies and if they accept them (which most do by default).

I hope this helps the situation! :)


THANK you, This helped ALOT!:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1