Programming

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; ?>
php tcpdf
TCPDF ul li works actually
December 25, 2022
0
$pdf = new PdfLibrary('P', 'mm', 'A4', true, 'UTF-8', false); //$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetTitle('My Title'); $pdf->SetHeaderMargin(30); $pdf->SetTopMargin(30); $pdf->setFooterMargin(30); $pdf->SetAutoPageBreak(true); $pdf->SetAuthor('Author'); $pdf->SetDisplayMode('real', 'default'); $pdf->AddPage(); $pdf->SetLineStyle( array( 'width' => 5, 'color' => array(0,0,0))); $pdf->Line(0,0,$pdf->getPageWidth(),0); $pdf->Line($pdf->getPageWidth(),0,$pdf->getPageWidth(),$pdf->getPageHeight()); $pdf->Line(0,$pdf->getPageHeight(),$pdf->getPageWidth(),$pdf->getPageHeight()); $pdf->Line(0,0,0,$pdf->getPageHeight()); //https://ourcodeworld.com/articles/read/275/how-to-encrypt-a-pdf-password-protection-against-copy-extraction-or-modifications-generated-with-tcpdf-in-php //$pdf->SetProtection(array('print', 'copy','modify'), "ourcodeworld", "ourcodeworld-master", 0, null); $pdf->SetMargins(10, 20, 10, true); //$pdf->Write(5, 'Some sample text'); […]
Flutter Programming
Flutter Project: Insecure URL is not working in Android / IOS
April 14, 2021
0
, , , ,
I am developing a flutter project called ZTutor. While testing in Android my login was not working, my app was sending data to localhost, which is my local pc. My localhost url was http://192.168.0.105/ztutor/login.php but that url was not receiving any request from the App. So, I changed in the android/app/src/main/AndroidManifest.xml: I have added this […]
IOS Programming
firebase: PERMISSION_DENIED: Missing or insufficient permissions
July 28, 2020
0
While Developing IOS App that writes / reads from Firebase, I have found that it was not writing any data in Firebase or can not read data from Firebase, when I saw console, I found a error like “[Firebase/Firestore][I-FST000001] WriteStream (7fea67f13818) Stream error: ‘Permission denied: Missing or insufficient permissions.'” So, then I have gone to […]
Commands Linux CentOS php Server WHM
WHM:: PHP Mail is Not Working-Showing Its Disable
June 24, 2020
0
When your mail does not work, one example could be as below: Now Update your php.ini from WHM MultiPHP INI Editor, you can see: disable_functions = mail Modify it with disable_functions = Click Save Restart your APACHE from WHM or command prompt.
CodeIgniter Framework Coding php
Severity: Warning Message: Cannot modify header information – headers already sent by
November 13, 2019
0
, ,
Suddenly I am getting the below error message in my Codeigniter project after updating my server with new PHP upgraded version –“Severity: Warning Message: Cannot modify header information – headers already sent by“ The Simple way to solve it is write the below command in php.ini: output_buffering = On
Uncategorized Wordpress Plugin Development
Add Custom Logo in WordPress Plugin for Custom Post Type
August 15, 2018
0
, ,
1 Pick an icon Goto: http://fontawesome.io/icons/   2. You will get the SVG version here: https://github.com/encharm/Font-Awesome-SVG-PNG You will see folder named “black” (if you need black icon), under that folder, click the folder “svg”,  you will see the icons list, you will have to get the raw code of particular svg icon. Example Raw code: <?xml […]
Algorithm Dictionary php Programmer Programming Security
Steganography
January 11, 2018
0
Images have been used to hide secret messages using a process called Steganography. Have you ever watched a spy movie where the operative goes to a profile and using the picture there, extracts a secret message? This is called steganography, concealing information inside something else. While there are many ways to accomplish this, one of […]