19 Mar, 2024

How to execute batch file via PHP?

The main issue was of path and permission. I have gotten my batch file to execute. Here is my solution: I run my batch file from the same folder the php file is in. exec(“mybatch.bat”); I make sure that Apache Service has enough permission to run the batch file. Just to test i used an administrator account for […]

Share your Love
1 min read

How To create or use PHP Phar archives improve website performance

PHP Phar (PHp ARchive) is a file format used in PHP for packaging entire applications or libraries into a single archive file. Phar archives can simplify the distribution and deployment of PHP applications by bundling all necessary files into a single file, making it easier to manage and distribute applications. Advantages of PHP Phar Single […]

Share your Love
2 mins read

jQuery UI Virtual Keyboard Plugin Example

 Here is jQuery UI virtual keyboard plugin.  This plugin will provide features like 1) An on-screen virtual keyboard embedded within the browser window which will popup when a specified entry field is focused.2) The user can then type and preview their input before Accepting or Canceling.3) Add custom keyboard layouts easily.4) Add up to four […]

Share your Love
1 min read

google map show multiles marks with infowindow

<html> <head> <meta name=”viewport” content=”initial-scale=1.0, user-scalable=no”> <meta charset=”utf-8″> <title>Info window with <code>maxWidth</code></title> <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false”></script> <script> var locations = [{“title”:”Dr. test test”,”latitude”:”23.0061749″,”longitude”:”72.5190038″,”iw_content”:”<div id=’content’>n<div class=’map_photo’>n<img src=’http://localhost/healthjump/images/mypro.png’/>n</div>n<div class=’map_dleft’>n<span class=’dname’>Dr. test test</span><br/>n<span class=’speciality’>03-Internist</span><br/>n<span class=’practice’>NYU Faculty Group Practice</span><br/>n<span class=’email’>abc@gmail.com</span>n</div>n<div class=’map_last_add’>n<span class=’address’>vejalpur, ahmedabad, nGujarat, India – </span>n</div>n</div>”}, {“title”:”Dr. Mohit Gupta”,”latitude”:”23.0095879″,”longitude”:”72.5618894″,”iw_content”:”<div id=’content’>n<div class=’map_photo’>n<img src=’http://localhost/healthjump/images/mypro.png’/>n</div>n<div class=’map_dleft’>n<span class=’dname’>Dr. Mohit Gupta</span><br/>n<span class=’speciality’>04-Nephrologist</span><br/>n<span class=’practice’>NYU Faculty Group […]

Share your Love
1 min read

How to Add javascript in Joomla

There are three ways to add javascript Inline JavaScript 1: <?php 2: $document = JFactory::getDocument(); 3: $document->addScriptDeclaration(‘ 4: window.event(“domready”, function() { 5: alert(“An inline JavaScript Declaration”); 6: }); 7: ‘); 8: ?> External JavaScript There are two ways to include a JavaScript file 1: <?php 2: $document = JFactory::getDocument(); 3: $document->addScript(‘/media/system/js/sample.js’); 4: ?> The second […]

Share your Love
1 min read

.htaccess Block hot linking from specific domains

RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(.+.)?myspace.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+.)?blogspot.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+.)?livejournal.com/ [NC] RewriteRule .*.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L] RewriteEngine On  RewriteCond %{HTTP_REFERER} ^http://(.+.)?myspace.com/ [NC,OR]  This condition was not met but the OR option made it pass RewriteCond %{HTTP_REFERER} ^http://(.+.)?blogspot.com/ [NC,OR]  This condition was not met but the OR option made it pass RewriteCond %{HTTP_REFERER} ^http://(.+.)?livejournal.com/ […]

Share your Love
1 min read