Is it possible to write a webserver for a sim900 to write to in express.js

who is johndavidson9 ? two accounts for @rocketlyy??

could you share the code?

not my account. no idea.

webserver or sim900?

The SIM900 part
I assume the PHP part just returns something basic

it’s what you sent me. the exact thing, aside from the APN, server ip, and server domain.

i’m using express for it

the one from the link in #52?

this code

so this is the GET request, I think this will make it as is on the other side[quote="J-M-L, post:43, topic:944130"]

  sendCommand("GET http://yourserver.com/get_test.php HTTP/1.1", 0);              // send a GET request

[/quote]
You could try to send a larger header

GET http://yourserver.com/get_test.php HTTP/1.1
host: 'api-1.codehouse.repl.co',
user-agent: sim900/1.0
Connection: close

so replace with

sendCommand("GET http://yourserver.com/get_test.php HTTP/1.1\r\n host: 'api-1.codehouse.repl.co'\r\nuser-agent: sim900/1.0\r\nConnection: close\r\n\r\n", 1000)

still gives me an error

And if you duplicate the full header from #57?

Try also with HTTP/1.0 Insteadof 1.1

okay. with your code, im just getting straight error, but with that thinkspeak code from earlier, im getting HTTP/1.0 400 Bad Request Content-Type: text/html

Did you use 1.0 or 1.1 for HTTP ?

I tried it with both

Okay. So. It works now with some other code with a PHP script on my own website.

Whenever I try to use http for the replit website (where I want to send the request), I get an error saying it moved, and it redirects me to the https link instead.

So you need to figure out how to send an HTTPS request… not sure how if the command is not supported