Insertion of multiple GET lines automatically php

Asked

Viewed 46 times

0

I have several lines like this:

http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30
http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30
http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30
http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30
http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30
http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30
http://192.168.0.1/feed/data.json?id=71667&start=1426031940000&end=1426064520000&interval=30

I need to execute them to make an insertion in the bank, ?

  • where are these url? run as ? vc has several possibilities for ex make a request in Curl or a file_get_contents in php. show what you are trying to do and what language you are using and how you want it to happen.

  • The uls, I have them in a file. txt , because I brought it from a log,and I need to run it in the browser,because they are a GET that will feed a database,and remembering,this will be done only once to repair a database that got lost.

  • I can put them links in a database as well,

  • another question you need it to be processed in the backend or the front or whatever? because there are several ways to do this.

  • it doesn’t matter, because I’ll only do it once,.

  • Just save how. csv and import into Mysql Workbench (or another equivalent Mysql client), or even paste into a source editor, insert quotes at the beginning, quotes and comma at the end (almost any editor does this easily on all lines) and put the INSERT command at the beginning. To put quotes and comma just replace.

  • Example: http://pastebin.com/REmx6qLb - I must have spent 30 seconds at most.

Show 2 more comments

1 answer

1


Next you’ll post a POG here:

Method: POG ( c does not know what q he Pog looks for in google kkk )

will put your url in a db and then search with a normal Selct so that ai vc printa iframe with the link you load, like this:

$sql="Select * from minhatabela";
$query=mysqli_query($conexao,$sql);
while($result=mysqli_fetch_array($query,MYSQLI_ASSOC)){
   echo "<iframe src='$result[url]'></iframe>";
}

if you want other methods let me know which complement.

  • I got it, it’s going to happen,

  • ^^ c come right warn , hug

  • Okay, when you have time if you can go through other ways that you know, just for the knowledge base itself,.

  • vc can do a while by loading the contents of the url using get_file_contents or making a Curl request, if you have it on linux you can do an array with vars and run wget if it was in kornshell

  • op a votin by the good will there and concludes c worked

Browser other questions tagged

You are not signed in. Login or sign up in order to post.