Hello all, I need a little help with a bit of php code to asp.net.
Environment: VS2008
Language: VB or C#
Complete source: http://code.google.com/p/jpegcam/
Specific file: test.php
I have tried various logical asp.net (vb) variations to no avail. In short, the project is flash based and allows the user to take a snapshot from their web-cam then upload the image to a web server. Permissions, settings and testing proved successful with the php code as well as a sample asp.net upload and file creation. The error is in my asp.net code.
The php code is only a few lines long. The line in question is below.
$result = file_put_contents( $filename, file_get_contents('php://input') );
Any help would greatly be appreciated. Thanks a million, Dave
Entire php code:
<?php
$filename = date('YmdHis') . '.jpg';
$result = file_put_contents( $filename, file_get_contents('php://input') );
if (!$result) {
print "ERROR: Failed to write data to $filename, check permissions\n";
exit();
}
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . $filename;
print "$url\n";
?>