Skip to main content

Posts

Showing posts from 2018

How To Validate Email and Url In Php

Validate Email Address In Php $email = test($_POST["email"]); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {   $emailError = "Invalid email format"; } Validate Url In Php $website = test($_POST["website"]); if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",$website)) {   $websiteError = "Invalid URL"; } thank you team gajabwap web in hindi

How to Create Meta Tag Generator Tool With Angular Js

Simple Meta Tag Generator Tool With Angular Js Demo- Meta Tag Generator With Angular Js <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <body> <div ng-app=""> <p>Title: <input type="text" ng-model="title" placeholder="Enter name here"></p> <p>Description : <input type="text" ng-model="description" placeholder="Enter name here"></p> <p>Keywords : <input type="text" ng-model="keywords" placeholder="Enter name here"></p> <p>Author : <input type="text" ng-model="author" placeholder="Enter name here"></p> <p>Country : <input type="text" ng-model="country" placeholder="Enter name here"></p> <textarea> ...

How to Check Website Availability with PHP

Hello friends ajj me apko btaunga ki kis parkar ham check kar sakte hai ki website is available or not. Demo- check website is Available or Not <form action="" method="post"> Enter Website Url<input type="text" name="name"><br> <input type="submit" name="submit"/> </form> <?php error_reporting(0); function Siteexist($url){        // Initialize cURL     $curlInit = curl_init($url);       // Set options     curl_setopt($curlInit,CURLOPT_CONNECTTIMEOUT,10);     curl_setopt($curlInit,CURLOPT_HEADER,true);     curl_setopt($curlInit,CURLOPT_NOBODY,true);     curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true);     // Get response     $response = curl_exec($curlInit);       // Close a c...

Simple Search Bar With Php & Mysql

<html> <title></title> <head> </head> <body> <fieldset> <form action="" method="POST"> <center><h3> Check Result</h3></center> <center> Search<br> <input type="text" name="rolld" > <br><br> <input type="text" name="dob"> <br><br> <input type="submit" name="submit"> </center> </form> </fieldset> </body> </html> <center> <?php error_reporting(0); $conn = mysqli_connect("localhost", "root", "","schoolreult"); //search code //error_reporting(0); if($_REQUEST['submit']){ $name = $_POST['name']; $result=$_POST['result']; $rolld=$_POST['rolld']; $fathername=$_POST['fathername']; $dob=$_POST['d...

How To Get Factorial Of Any Number In Php

Simple Factorial Program In Php <?php   if(isset($_POST['submit'])){ $num = $_POST['num']; $factorial = 1; for ($x=$num; $x>=1; $x--)   {     $factorial = $factorial * $x;   }   echo "Factorial of $num is $factorial";   } ?>   <form action="" method="POST"> <input type="text" name="num"> <input type="submit"  value="submit" name="submit"> </form> Thank You Team Gajabwap Web In Hindi

How To Create Live Word Counter With Javascript

Live Word counter Kaise Bnaye-ajj me apko btaunga ki kis trah aap sirf 2 minutes me javascript live word counter bana sakte ho. demo- <head> <script> function countcharacter(count){     document.getElementById("word").innerHTML = count.value.length; } </script> </head> <body> <textarea name="message" onkeydown="countcharacter(this);"></textarea> <font color="red"><p id="word"> </p></font> </body> </html> javascript word count word count code in javascript javascript character count word count validation in jquery input word count javascript write a javascript program to count number of words in string jquery count words in div textarea character count javascript Thank You Team Gajabwap Web In Hindi

How To Send Email In Codeigniter

Hello friends ajj me apko btaunga ki ham codeigniter framework me kis trah se email send kar sakte hai easily. Yanha sabse pehle ham email library ko load karwayege jiski madad se ham codeigniter me email send kar payege Send text mail- $this -> load -> library ( 'email' ); $this -> email -> to ( 'recipient@example.com' ); $this -> email -> from ( 'yourmail@gmail.com' , 'formname' ); $this -> email -> subject ( 'Test Email (TEXT)' ); $this -> email -> message ( 'Text email testing .' ); $this -> email -> send (); Send   mail to multiple recipient- $this -> email -> to ( 'first@example.com, second@example.com, three@example.com' ); Send html mail- $htmlContent  =  'HTML email testing' ; $htmlContent  .=  'enter content in this email' ;      $config [ 'mailtype' ] =  'html' ; $this -> email ->...

How To Create Meta Tag Generator Tool using Javascripts

Hello friends ajj me apko btaunga ki kis parakar ham html and javascript ka use karke meta tag generator tool bana sakte hai. 1-sabse pehle aap ek index.html file create kar lijiye or wanha niche diya gya code paste kar dijiye. Index.html- <html> <head> <script language="JavaScript"> <!-- Begin function create(form) {   if (confirm("Are you sure?")) {     form.story.value = " <!-- Copy all code --> \n" +    " \n" +          " \n\n";     if (form.input2.value != "") {       form.story.value +=" <b:if cond='data:blog.url == data:blog.homepageUrl'>      <meta NAME=\"Description\" CONTENT=\"" +       form.input2.value + "\"/></b:if>\n";     }     if (...

How to Import a image from URL and Store In Database

Hello friends ajj me apko btaunga ki kis parkar ham url se image import kar sakte hai or us image ko database me store karwa sakte hai.. Yanha ham sabse pehle image ko image url address ke jriye import karege or uske bad import hue image ko mysql database me store karege. Steps- 1-sabse pehle aap mysql databse me imagescrap name ka ek database bana lijiye 2-ab us database me  users name ka ek table bana lijiye jisme 2 field bana lijiye id and new Ab aap niche diye gye code ko copy karke apne system me index.php name ki file bana lijiye or wanha niche diya gya code paste kar dijiye.or save kar lijiye <html>     <body><fieldset><center>      <h1> scrap Image from url</h1>         <form method="post" action="">             <input type="text" name="img_url" placeholder="En...

How to Send SMS WITH Mvaayoo API in PHP

Hello friends ajj me apko btaunga ki kis parkar aap mvaayoo api ka use karke php website me sms send kar sakte ho localhost ya webshosting se. Steps- 1- https://www.mvaayoo.com 2-ab aap is website par account bana lijiye Apka account create hone ke bad mvaayoo ki traf se apki email id par apki login detail email id and password a jayegi . 3-apko sirf wanha se apni email id and password ko niche diye gye code me paste karna hai. Itna karte he ap mvaayo api ka use karke sms send kar sakte ho. Mvayoo company ki traf se apko 20 msg free of  cost provide kiye jate hai jinka use aap testing ke liye kar sakte ho. Index.php <?php $ch = curl_init(); $user=" enter your account email id here : enter your password here "; $receipientno=" enter reciver mobile number here "; $senderID="TEST SMS"; $msgtxt="this is test message , test"; curl_setopt($ch,CURLOPT_URL,  "http://api.mVaayoo.com/mvaayooapi/MessageCompose");...

How To Login With linkedin Using Javascript

Hello friends ajj me apko btaunga ki kis parkar ham javascript ka use karke login kar sakte hai. Step 1- https://www.linkedin.com/developer/apps Sabse pehle aap  upper diye gye link se linkdin app create kar lijiye yanha apko kuch detail company name,app name etc fill karne hai Step2-yanha website url me aap apne file ke path dale jese me is program ko localhost par run karwa raha hu uska website url is parkar hai Example- http://localhost/linkdin/index.php/ or http://localhost/linkdin/ Aap in dono me se kisi be trah se apna website address enter karke apna linkdin app create kar sakte ho Step3- app create hone ke bad apko yanha se ek api key milege jise hme niche diye gye code me sirf paste karke code ko save kar dena hai Steps4- create a file index.html Index.html <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script type="text/javascript" src=...

How To Trace IP address With Php

Hello friends  is post me apko btaya jayega ki kis parkar ham kisi be ip address ko trace kar sakte hai.or aap apni website me ip address tracker tool integrate kar sakte ho Step1-create a index.php file Is parkar aap easily kisi be user ka ip address track kar sakte ho <fieldset> <form action="" method="POST"> <input type="text" name="ip"/> <br> <input type="submit" name="submit"> </form></fieldset> <?php if(isset($_POST['submit'])){ $ip = $_POST['ip']; // the IP address to query $query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip)); if($query && $query['status'] == 'success') {   echo 'Hello visitor from '.$query['country'].', '.$query['region'].'!'; echo "...

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 ...