sizcoz's Recent Forum Activity

  • Call me stupid, but I haven't got it to work yet.

    To be honest It was a simple process in C2, but without any working event examples, it's hard to work out how to implement it, obviously whoever wrote the Binary plugin knows how to do it, and it wouldn't take much to show a simple example to us.

    There is also a way to convert the snapshot binary back to base64, but yet again, until an example is shown, I have no idea how to do it.

    Anyway I suppose someone will work it out oneday.

  • File structure

    You don't have to call your folder index, just call it something like, New Project.

    Have you got any project to run on your server, like a game?

  • Just put the php file in the public folder.

    Your c2 project should be in its own folder in the public folder, so just drag the exported c2 folder to the public folder, with filezilla, and call it something other than index.

    see if that works

  • Are You are missing the .com in your send and request or is your jpg not wide enough?

    Also its saying that this file is not found on your server

    http://affordableconnoisseur.000webhostapp.com/c2mail.php

  • What do you mean by 'getting an echo back'? Do you mean, after I press the 'OK' button, something should show up at the bottom of the form? If that's the case, the answer's no. I did not get (see) any echo at the bottom of the form after attempting to send an email.

    Yes you will get a sent time conformation after sending, beneath the button, where it says confirm

    The php looks fine, but if you want to check it for errors run the file directly in the browser, and you should get a response saying "Message sent at (and the time here)".

    I have just checked my original project and it works fine in c2 .

  • Did you see the 'index.html Folder File Structure' image I put in my original post?

    Are you getting an echo back with the time sent at the bottom of the form ?

    Also It will not work on Localhost(construct preview), you have to export it and put the folder on your server.

    You can check the php for errors, with just running it in the browser.

  • The php file should go into your root folder on the server, it should not be part of C2, it should be saved separately by notepad, and then transferred to the root fold on your server.

    1. save it with notepad.
    2. Send to server via ftp with software like 'filezilla' put it into the root folder of

      affordableconnoiseur.000webhostapp.com/[/li]

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • blob: URLs only last for the duration the browser window is open. That is irrelevant to this process though, because you immediately load it in to a Binary Data object and send it to the server.

    Ok, but I can't work out how to actually load it into the Binary Data Object with AJAX, I would like have an event example, because I can't work out how to do that.

    cheers

  • Thanks Ashely and fellow Constructors!

    If anyone knows how long do Blob's exist? Seems like their is a window to write them into a file. Sorry new to this sort of transfer via PHP

    Think some wrapper may need to be activated for the PHP settings on our server and then maybe I'll be able to save the binary to a php but so far no luck.

    From what I have read in the Manual:

    The URL is a blob: URL referring to data in memory. It can only be used in the same session, in the same browser, on the same device. Sharing the URL or saving it to be re-used in another session later will not work.

    So It looks like we need the Binary data from the URL first, then it can be posted via AJAX to the PHP Script on the server.

    I Haven't figured out how to get the Binary data from the URL yet in C3, But as Ashley says it is possible, it would be nice if anyone could post an example of this.

    cheers

  • Moved to C3 forums.

    You should avoid converting to base64 if you can - it's slower and uses more bandwidth than the binary (blob) equivalent. Any good server should be able to handle binary data directly.

    So the approach I'd recommend is:

    1. Take a canvas snapshot (either runtime or Drawing Canvas)
    2. Use AJAX to load the snapshot URL in to Binary Data
    3. Post the Binary Data to the server

    If you really can't figure out how to load binary on the server and are willing to use a less efficient approach, the Binary Data object can also convert to base64.

    I don't have a problem with steps 1 & 3 , but

    1. having a problem figuring out how to use AJAX to load the snapshot in to Binary data, if anyone could lead me in the right direction ?
    2. Also as is stated in the Manual, The URL is a blob: URL referring to data in memory. It can only be used in the same session, in the same browser, on the same device. Sharing the URL or saving it to be re-used in another session later will not work.
    3. What is the procedure to convert the URL back to Base64, as I can find the expression GetBase64, but do not know how to implement it ?

    I would pefer to send the Binary data to my server, but the way to convert the URL into Binary data does not seem to be straight forward or apparent.

    Cheers

  • I assume your question is about Construct 3? This is Construct 2 forum.

    Yes the reference is to my tutorial https://www.construct.net/en/tutorials/screenshot-capture-to-email-1320

    This does not work in C3 because the data is blob instead of base64.

    Is there anyway to convert the Canvas Snapshot back to base64 in c3?

  • Is your sever Https ? (Secure server)

sizcoz's avatar

sizcoz

Early Adopter

Member since 19 Apr, 2014

Twitter
sizcoz has 8 followers

Connect with sizcoz

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x12
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies