Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $stack = array("par1","par2", "par3","par4");
- foreach ($stack as $prof){
- echo $prof , '<br>';
- $url = "http://www.myservice.eu";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $prof);
- $output = curl_exec($ch);
- $jsonDecode =json_decode($output);
- echo "value is ".$jsonDecode -> field1."<br>";
- curl_close($ch);
- echo "<br><br>";
- }
- $stack = array("search=par1","search=par2","search=par3");
- $filename = "test.txt";
- $source_file = fopen( $filename, "r" ) or die("Couldn't open $filename");
- while (!feof($source_file)) {
- array_push($stack, "search=".fgets($source_file));
- }
- fclose($source_file);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement