sizcoz's Forum Posts

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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]

  • 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)

  • You could also use.

  • Thanks guys,

    It's taking me a little longer to figure this out but you're suggestions are challenging me to think ;)

    If you simply want it to bump back 3 times the size of your sprite, you could do something like this.

    This is presuming your sprite is 64 in width

  • I was wondering how could someone do the same thing for a platform game, where there could be the need for the follower character to jump to follow the leader.

    You could do something with an array, like this.

    http://www.sizzle-games.com/follow.capx

  • You do not have permission to view this post

  • Here,s the regex answer.

    Explanation

    /

    (?<=start text\s).*(?=\send text)

    /

    Positive Lookbehind (?<=start text\s)

    Assert that the Regex below matches

    start text matches the characters start text literally (case sensitive)

    \s matches any whitespace character (equal to [\r\n\t\f\v ])

    .* matches any character (except for line terminators)

    * Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)

    Positive Lookahead (?=\send text)

    Assert that the Regex below matches

    \s matches any whitespace character (equal to [\r\n\t\f\v ])

    end text matches the characters end text literally (case sensitive)

    Cheers

  • Hello all, I need to learn to how to send an email with Construct 3... Can someone help me understand how it all works (the easiest way in 2019), in layman's terms? Are there any C3 addons to send emails?

    https://www.construct.net/en/tutorials/sending-an-email-from-construct2-1068

    Try this.