Coding

CodeIgniter Framework
How do i install older version of CI4 using composer
October 10, 2023
0
Sometimes when you run git update & composer update, it updates codeigniter framework, then suddenly your app stops working unless you upgrade your codebase as per new framework requirement or downgrade to last version that you had. The below is the command to downgrade codeigniter to a version: # composer require codeigniter4/framework:4.1.5  
Coding php ThirdPartyAPI
hitpath API: Read Affiliates Record
May 15, 2023
0
, ,
<?php $offset = 0; $limit = 10; $url = "http://api.1318amethyst.com/api/v1.1/affiliates?all_details=1&offset=$offset&limit=$limit"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPGET, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "auth_token:6d4888962feba3c669176b81edacb185", "accept:application/json", )); $raw_response = curl_exec($ch); $response = json_decode($raw_response); $error = curl_error($ch); $tmp_file = 'h3.txt'; if ($error) { $response->error = curl_error($ch); } else { file_put_contents($tmp_file, $raw_response); //$this->file_transfer->send_file($tmp_file, $tmp_file); } curl_close($ch); echo $raw_response; ?>
Coding php ThirdPartyAPI
hitpath API: Read Campaigns Record
May 15, 2023
0
, ,
<?php $offset = 0; $limit = 10; $url = "http://api.1318amethyst.com/api/v1.1/campaigns?all_details=1&offset=$offset&limit=$limit"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPGET, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "auth_token:6d4888962feba3c669176b81edacb185", "accept:application/json", )); $raw_response = curl_exec($ch); $response = json_decode($raw_response); $error = curl_error($ch); $tmp_file = 'h2.txt'; if ($error) { $response->error = curl_error($ch); } else { file_put_contents($tmp_file, $raw_response); //$this->file_transfer->send_file($tmp_file, $tmp_file); } curl_close($ch); echo $raw_response; ?>
Coding ThirdPartyAPI
hitpath API: Read Advertisers Record
May 15, 2023
0
, ,
<?php $offset = 0; $limit = 10; $url = "http://api.1318amethyst.com/api/v1.1/advertisers?all_details=1&offset=$offset&limit=$limit"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPGET, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "auth_token:XXXXXXXXXXXXXXXX", "accept:application/json", )); $raw_response = curl_exec($ch); $response = json_decode($raw_response); $error = curl_error($ch); $tmp_file = 'h1.txt'; if ($error) { $response->error = curl_error($ch); } else { file_put_contents($tmp_file, $raw_response); //$this->file_transfer->send_file($tmp_file, $tmp_file); } curl_close($ch); echo $raw_response; ?>
CodeIgniter Framework
Codeigniter 4 Tweak: How to Remove public & index.php from browser for better SEO
July 27, 2021
0
, , ,
CodeIgniter4 framework-based site page needs to browse using the public by default. If you want to remove that public from the URL & also if you want to remove index.php from URL, do the following things: Step 1: Copy public folder index.php & .htaccess to the root folder Step 2: Then in the root index.php […]
IOS + Swift Swift 5
Swift – Add Sections to List
May 9, 2021
0
struct Pizzeria: View {     let name: String     var body: some View {         Text(“Restaurant: \(name)“)     } }   struct MainView: View {     var body: some View {         List {             Section(header: Text(“Important tasks”)) {     […]
IOS + Swift Swift 5
Swift – How to let users delete rows from a list
May 9, 2021
0
struct MainView: View {   @State private var users = [“ZERIN”, “ARIF”, “TIKLU”]     var body: some View {         NavigationView {             List {                 ForEach(users, id: \.self) {                   […]
IOS + Swift Swift 5
Swift – Carousel Lists on watchOS
May 9, 2021
0
List(1..<51) { Text("\($0)") } .listStyle(CarouselListStyle())
IOS + Swift Swift 5
Swift – create expanding lists
May 9, 2021
0
,
// //  MainView.swift //  MySwiftLearning1 // //  Created by Arifur Rahman Jerin on 4/30/21. // import SwiftUI struct Bookmark: Identifiable {     let id = UUID()     let name: String     let icon: String     var items: [Bookmark]?     // some example websites     static let apple = Bookmark(name: […]
Swift 5
Swift – create grouped and inset grouped lists
May 9, 2021
0
//  MainView.swift //  MySwiftLearning1 // //  Created by Arifur Rahman Jerin on 4/30/21. // import SwiftUI struct Pizzeria: View {     let name: String     var body: some View {         Text(“Restaurant: \(name)“)     } } struct MainView: View {     var body: some View {     […]