Search found 31 matches

by studgomel
Wed Mar 06, 2019 2:04 am
Forum: General Code Repository
Topic: Unzip using php code
Replies: 0
Views: 24

Unzip using php code

:evil: Hi, following code is to unzip a zip file using php code: <?php function unzip($location,$newLocation){ if(exec("unzip $location",$arr)){ mkdir($newLocation); chmod($newLocation,0777); for($i = 1;$i< count($arr);$i++){ $file = trim(preg_replace("~inflating: ~","",$arr[$i])); chmod($file,0777)...
by studgomel
Wed Mar 06, 2019 2:00 am
Forum: HTML and XHTML stuff
Topic: Differences between HTML and XHTML
Replies: 0
Views: 6

Differences between HTML and XHTML

:D 1. An XHTML documents must be well formed like XML, While HTML doesn't. 2. In HTML, some tags (e.g., <br>) are don't need to have closing. But in XHTML the elements must be closed. XML permits two types of closing tags as <br /> and <br></br>. 3. Similarly HTML permits omitting end tags for forma...
by studgomel
Wed Mar 06, 2019 1:53 am
Forum: General Code Repository
Topic: Display ads on googlemaps
Replies: 0
Views: 7

Display ads on googlemaps

:? Hi Friends, There is one class available in google maps API called "GAdsManager" which allows us to display google ads on googlemaps. Save the below code as .html and run it in browser to see the output. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xht...
by studgomel
Wed Mar 06, 2019 1:50 am
Forum: General Code Repository
Topic: Div refresh automatically with time interval
Replies: 0
Views: 8

Div refresh automatically with time interval

:ugeek: Hi friends , This is a simple code for div refresh automatically with certain time interval.Here is the code. <html> <head> <script src="js/jquery-1.3.2.min.js"></script> <script> $(document).ready(function() { $("#samplediv").load("test.php"); var id = setInterval(function() { $("#samplediv...
by studgomel
Wed Mar 06, 2019 1:48 am
Forum: General Code Repository
Topic: Simple ajax star rating using database
Replies: 0
Views: 10

Simple ajax star rating using database

:oops: Hi All, This is the simple ajax star rating script . <html> <head> <style> body{ font:12px Arial, Helvetica, sans-serif; padding:40px; } </style> <script src="rating/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function() { getRating(); function getRating(){ $.aj...
by studgomel
Wed Mar 06, 2019 1:45 am
Forum: General Code Repository
Topic: Add slashes automatically to all post params
Replies: 0
Views: 9

Add slashes automatically to all post params

Hi there, Some times when your form input filed contains single quotes the sql query errors occurred, so you need to add slashes function for every post param before insert into db, here is the simple solution which adds slashes before single quote or special chars for all posted params. #adslashes....
by studgomel
Wed Mar 06, 2019 1:43 am
Forum: General Code Repository
Topic: Capitalize First Letter Of Every Sentence in php
Replies: 0
Views: 8

Capitalize First Letter Of Every Sentence in php

:| Hi Friends, Here is an extremely useful snippet of code that will properly format sentences with capitalization. <?php $string = "This Is Senior And Expert Php Developers Discussion Forum By Nyros Technologies"; //first we make everything lowercase, and then make the first letter if the entire st...
by studgomel
Wed Mar 06, 2019 1:41 am
Forum: General Code Repository
Topic: SMTP server settings when send mails through phpmailer class
Replies: 0
Views: 6

SMTP server settings when send mails through phpmailer class

:cry: :cry: Hello friends, Some times mail send from other domains instead of hosted address. So use the phpmailer as below to avoid sending mails from other domains or from default from email like sdsecur@nllads.com. <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); //...
by studgomel
Fri Mar 01, 2019 1:25 am
Forum: wordpress
Topic: How to add admin Menu in wordpress
Replies: 0
Views: 28

How to add admin Menu in wordpress

:twisted: Hi Friends, The below functions are giving help for How to add admin menus and submenus in wordpress. //This function is for add menu to the admin area in wordpress add_menu_page( $this->page_title, $this->menu_title, $this->access_level, $this->plugin_dir, array ( $this , 'main_page'), $t...
by studgomel
Wed Feb 27, 2019 7:43 am
Forum: General Code Repository
Topic: jquery login window like twitter
Replies: 0
Views: 15

jquery login window like twitter

:!: :idea: Hi Friends, To use the login like twitter using jquery please follow the below code. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Twitter Login</title> <script type="text/javascript" src="http://ajax.g...