Skip to content

Instantly share code, notes, and snippets.

View Get images from Given URL
<?php
$html = file_get_contents('http://venugopalphp.wordrpess.com');
$dom = new domDocument;
@$dom->loadHTML($html);
$dom->preserveWhiteSpace = false;
$images = $dom->getElementsByTagName('img');
$i=0;
foreach ($images as $image) {
echo '<img src='.$image->getAttribute('src').'>';
@Venugopal155
Venugopal155 / checking_gravatar.php
Last active Jun 21, 2016
Checking gravatar is there or not in wordpress
View checking_gravatar.php
<?php
/* Function for check gravatar */
function check_avatar($user_email_id) {
$hash = md5(strtolower(trim($user_email_id)));
$uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=404';
$headers = @get_headers($uri);
if (!preg_match("|200|", $headers[0])) {
@Venugopal155
Venugopal155 / Remove_cookie.php
Created Jun 21, 2016
Remove Cookie while logout
View Remove_cookie.php
@Venugopal155
Venugopal155 / custom_post_type_register.php
Created Jun 29, 2016
Custom post type register in wordpress
View custom_post_type_register.php
<?php
function amas_register() {
$labels = array(
'name' => _x('AMAs', 'post type general name'),
'singular_name' => _x('AMAs', 'post type singular name'),
'add_new' => _x('Add AMA', 'AMAs'),
'add_new_item' => __('Add New AMA'),
'edit_item' => __('Edit AMA'),
'new_item' => __('New AMA'),
'view_item' => __('View AMA'),
View location_page.php
<?php
/*
* Template Name: Location Template
*
*
* Description: In this page displays the location page information , most dynamic data
* coming from dashboard
*
* @author : Venugopal
* @category: Location page
@Venugopal155
Venugopal155 / load-popup.php
Last active Aug 14, 2017
On Page load POPUP
View load-popup.php
<style>
/*** VG Popup Starts here *****/
#vg-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
View Android SDK for ionic
Ionic Android SDK and simulator:
-------------------------------------
1. install openjdk
`sudo apt-get install openjdk-7-jdk`
2. install `android sdk`
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
@Venugopal155
Venugopal155 / html_share_buttons.html
Last active Apr 13, 2022
Pure HTML Share Buttons
View html_share_buttons.html
<h3>Pure HTML Share Buttons</h3>
<!-- Social Button HTML -->
<!-- Twitter -->
<a href="http://twitter.com/share?url=<URL>&text=<TEXT>&via=<VIA>" target="_blank" class="share-btn twitter">
<i class="fa fa-twitter"></i>
</a>