Skip to main content

Posts

How To Create Zip File In Codeigniter

Codeigniter Me Zip File Kaise Create Kare- Steps- 1-create a Sonu.php controller in Controller Folder - defined('BASEPATH') OR exit('No direct script access allowed'); class Sonu extends CI_Controller { public function index() { $this->load->view('form'); $this->load->helper('captcha'); $this->load->library('zip');//step1-load the zip helper $name = 'mydata1.txt';//step2-enter file name here $data = 'welcome here how are u bro i am new in php please help me to learn more things about php help me bro';//step3-enter the contant which you want to add in file $this->zip->add_data($name, $data); // Write the zip file to a folder on your server. Name it "my_backup.zip" $this->zip->archive('/path/to/directory/my_backup.zip'); // Download the file to your desktop. Name it "my_backup.zip" $this->zip->download('my_...

How To Login With Google Using Javascript

Hello friends ajj me apko btaunga ki kis parkar ham javascript ka use karke  google login kar sakte hai. Steps1- create a javascript file love.js love.js      function Success() {            gapi.client.load('plus', 'v1', function () {             var request = gapi.client.plus.people.get({'userId': 'me'});             //for display user detail             request.execute(function (resp) {                 var profileHTML = '<a href="javascript:void(0);" onclick="signOut();"><h3>Sign out</h3></a>';                 ...

How to use Implode And Explode Function In Php

Implode function- The implode() function returns a string from the elements of an array. Syntax- implode (separator , array) example1- <?php $line=array ('I','am','a','student'); echo implode(" ",$line); ?> Result- I am a student Example2- <?php $arr = array ('I','am','a','boy'); echo implode(" ", $arr); echo '<br>'; echo  implode(" , ", $arr); echo '<br>'; echo implode(" / ", $arr); echo '<br>'; echo  implode(" . ", $arr); echo '<br>'; echo implode(" - ", $arr); ?> Result- I , am , a , boy! I / am / a / boy! I . am . a . boy! I - am - a - boy! How To Use Explode Function-The explode() function breaks a string into an array. Syntax- explode (separator,string,limit) Example1- <html> <body> <?php $str="I am simple boy!"; print_r(exp...

How To Scrap Youtube channel Videos With Data Api v3 In Php

Steps- 1-open https://console.developers.google.com/ 2-click on select a project-yanha par new project create kar lijiye 3-kisi be name se aap project teyar kar sakte ho 4-project name enter karke create button par click kijiye 5- ab apke dwara bnaya gya project open kijiye 6-ab top header me search bar hoga wanha par “youtube data api” likhkar search kijiye ab apke pass youtude data api v4 ka option ayega us option par click kijiye 7-ab aap youtube data api ko enable kar lijiye,enable button par click kijiye 8-ab left me crenditianal ka option hoga wanha par click kijiye 9 ab create creditianal par click kijiye 10 ab api par click kijiye 11 is parkar apki api key generate ho jayegi. Aap yanha se jo api key apko milegi aap use copy kar lijiye. Or niche diye gye code me paste kar dijiye Index.php <form action="" method="POST"   enctype="multipart/form-data"/> <img ...

How to Remove index.php from URL in CodeIgniter

Hello Friends ajj me apko btaunga ki Codeigniter me index.php file kese remove kare- By default hmare file http://example.com/index.php/tutorials/ is parkar se show hoti hai jab b aap kisi be codeignter web site ya project ko access karte ho to. But ham ise or seo friendly and short bana sakte hai . yanha se index.php file ko remove karke. Index.php file remove karne ke bad hmara website url is parkar hoga. http://example.com/tutorials/ How To remove Index.php File- Iske liye apko root folder me .htaccess file open karne hai or wanha diye gye code ko remove karke wanha niche diye gye code ko paste kar dena hai. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] Aur .htaccess file ko save kar de. Ab aap http://example.com/tutorials/ enter karke apne website or project ko access kar sakte ho easily. Agar apko koi problem a rhe hai to aap comment me puch sakte ho. Thank You Gajabwap W...

How to send auto response email in PHP

Hello friends ajj me apko autoresponce email ke bare me btaunga. Autoresponse email kya hai or iska use kiu kiya jata hai- App logo ne dekha hoga ki jab ham internet me kisi website me signup ,register karte hai to us website ke dwara automatically hmare email id par  thanks ka message bhej diya jata hai.iska fayda ye  hota hai ki user ko confermation mil jati hai mail ke dwara ki   uska form ,data successfully register ho chukka hai. Yanha ham php mailer library ka use karke user ke mail id par autorespoce message send karege. Steps-make a index.php file index.php <center><!DOCTYPE html> <html> <body> <fieldset> <form method="post" action="mail.php"> <h1> Autoresponse Contact Form</h1> Firstname:<br> <input type="text" name="first_name"> <br> Lastname:<br> <input type="text" name="last_name"> <br...

How To Scrap Data Of Any Website Using Curl

Hello friends ajj me apko btaunga ki kis parkar ham kisi b website ka data scrap kar sakte hai Curl and File_get_contents Function Ka Use Karke- steps- 1-make a simple html form-sabse pehle ek html form create kar lijiye jiski madad se user webaddress enter karke submit karega 2- make a function-ab ham ek scrap name se fucntion create karege janha ham curl ko initialize and iske sare operation karege Method1 -How to scrap DATA with Curl- <form method="post" id="scrap_form" action=""> Enter Website URL To Scrape Data<br> <input type="input" name="website_url"><br> <input type="submit" name="submit" value="Submit" > </form> <?php function Scrap($website_url){ $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $website_url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($curl); curl_close($curl);...