$ file = "http://localhost/Project/SmartInventory/sims/simsLIB/barcode.php?codetype=Code128&size= $ imgsize & sizefactor = 1.2 & text = $ barcode & print = true & extraTxt = MRP: $ mrp & extraTxt1 = $ product";
// Open the file to get existing content $data = file_get_contents($file); // New file $new = '../../../images/barcode/new.png'; // Write the contents back to a new file file_put_contents($new, $data);