php

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'); […]
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
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 […]
Algorithm Fundamental php Programming
LUHN Algorithm to Validate Credit Card & Example & Implementation with Programming Example
January 21, 2016
0
The LUHN Algorithm is used to distinguish valid Credit Card numbers that is random selection of digits. Credit Card numbers that can be validated by the LUHN Algorithm have numbers that pass the following test: 1. Reverse the order of the digits in the number. 2. Take the first, third, … and every other odd […]