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

232
Views
How to pass php variable from html form to node js cheerio for scraping

I am stuck i have an html form field where users can input a url to scrape. After submitting the form i want to get the value in the form controller in laravel and send to node js to scrape the url.

My code is this:

controller:

class welcomechecker extends Controller
{

function getfrontpage(){

return view('welcome'); 

}

function saveformdata(Request $request){
    
 $url = $request->input('enter_url');
    
 $data=array('website'=>$url,"cms"=>$url,"plugin"=>$url);
    DB::table('checkplugin')->insert($data);
 
    

//  return $request->input();
}
}

node js file which is in node/file.js in root directory of laravel installation:

var express = require('express');
var fs = require('fs');
var request = require('request');
var cheerio = require('cheerio');
var app     = express();

//Scraping start
 app.get('/scrape', function(req, res){

}

Any help on how to send form value to the file.js from php laravel controller or any other method will be welcomed

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!