Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
Is it possible to run PHP with JavaScript?

They say that It is not possible, but what about it? I was working on project to improve my skills and found a trick to run PHP from JS.

async function runphp() {
    const response = await fetch('phpfile.php');
    const data = await response.json(); //optional
  }

So we just make a request and all the code inside PHP will run. Also for eg. if we want just one function from PHP to run it is possible to make cookie in javascript, read it in php and run only some functions based on cookie value. I don't know anything about security and I'm working on localhost so the question is: Is it good if I add project with this on my website?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!