[Development] Self Design / Original Design
Hello
I'm trying to run this system in php.
The game sends to the address in projectg (http://58.64.24.162:8090/upload/ucc/upload.asp) some info:
$ _POST values:
'ucctype => clothes
userid => usertest
type => 1
item_id => 792
key => 0
$ _FILES values:
uccfile => Array
name => m_pv_u01f01_d5e2908d.jpg
type => image / jpeg
tmp_name => C: \ WINDOWS \ Temp \ php31.tmp
error => 0
size => 24217
So we can send the image to the server. But I still need to know if something is returned or recorded in the database.
URLs for testing Pangya TH:
http://58.64.24.162:8090/upload/ucc/
http://58.64.24.162:8090/upload/ucc/upload.asp
http://58.64.24.162:8090/upload/ucc/ucc/clothes/
change these links in your projectG.exe
Exe: http://127.0.0.1/upload/ucc/upload.php
Can someone help me develop it?
Code upload.php
Code:
<?php
$file = isset($_FILES["uccfile"]) ? $_FILES["uccfile"] : FALSE;
if($file){
preg_match("/\.(gif|bmp|png|jpg|jpeg){1}$/i", $file["name"], $ext);
$image_name = $file['name'];
$image_dir = "ucc/" . $image_name;
move_uploaded_file($file["tmp_name"], $image_dir);
}
?>
ty
Re: [Development] Self Design / Original Design
I was planning to look into this as well.
The good thing: If UCC gets rolling, Ghost uploads should be trivial too.
Did you actually manage to force the client to talk to your webserver? At least on my setup I constantly get code 2 responses, indicating that it's still ini3's server answering - despite changing the address.
Re: [Development] Self Design / Original Design
USP_CREATE_KEY is called too, from gameserver
Re: [Development] Self Design / Original Design
Quote:
Originally Posted by
Tsukasa
I was planning to look into this as well.
The good thing: If UCC gets rolling, Ghost uploads should be trivial too.
Did you actually manage to force the client to talk to your webserver? At least on my setup I constantly get code 2 responses, indicating that it's still ini3's server answering - despite changing the address.
Yes, I get the answer.
the image is sends, but it is impossible to be edited.
Re: [Development] Self Design / Original Design
Quote:
Originally Posted by
Tsukasa
I was planning to look into this as well.
The good thing: If UCC gets rolling, Ghost uploads should be trivial too.
Did you actually manage to force the client to talk to your webserver? At least on my setup I constantly get code 2 responses, indicating that it's still ini3's server answering - despite changing the address.
To fix this you need to insert this into TA_SECURITY_TYPE_ACC:
Type: 1
Type_NM: Something
USE_YN: Y
IN_DATE: some date
After that it starts talking to the server specified.
Re: [Development] Self Design / Original Design
Thanks for the pointer, chreadie.
I'm fully able to save and use designs now, unfortunately it seems I still cannot unequip the item (this might be due to the fact that PART_ACC is still empty and I've overridden the procedure for UCC_LOAD to make it work), temporary saves do not get carried over to different sessions and the UCC-specific icon doesn't show up yet.
If anyone else has been working on those ends, I'd be glad for a few pointers; I don't need the details, just the gist of it.
The backend component is pretty much done (gotta fix some small problems with the verification and reset of security keys). I doubt I'll have to work on it much longer for a first preview, so I'll probably post a test version here as soon as I've fixed the issues mentioned before.
Obligatory screenshot attached.
Re: [Development] Self Design / Original Design
whats your response in the webserver?
Re: [Development] Self Design / Original Design
Could you be more specific? I'm afraid I don't understand what part you currently refer to.
Re: [Development] Self Design / Original Design
After uploading the image, what do you give back as response?
Re: [Development] Self Design / Original Design
I reply with PANGYA_UPLOAD_OK, PANGY_UPLOAD_ERR or ERR_SRVVAR depending on the status.
Re: [Development] Self Design / Original Design
Re: [Development] Self Design / Original Design
The promised test version (for developers and hack-savvy people only, kinda buggy and not fixed) for those interested.
Edit 2011-03-04: I deleted the links because a growing number of people seems to mistake the linked test version for something production-ready. This is not the case. The code I linked here was provided without any support.
If you have a legit reason for wanting these files, please PM me.
Re: [Development] Self Design / Original Design
Do you just print that on the page or send it in the headers?
EDIT: nvm i saw how you did it in your file
Thanks and great work!
Re: [Development] Self Design / Original Design
I just print it, Pangya doesn't seem to do any magic with headers.
You can give the files I linked to in my previous post a go.
Re: [Development] Self Design / Original Design
if i add the output to the script i have, it does what yours does.
But i cant get it to accept that the file has been uploaded, i get the file and its places where it should and echo "PANGYA_UPDATE_OK" and still error 10.