Skip to content

Instantly share code, notes, and snippets.

PHP Fatal error: require_once(): Failed opening required '/home/gaurish/domains/s3.hostingdost.com/public_html//wp-includes/class-wp-error.php' (include_path='.:/opt/php5/lib/php') in /home/gaurish/domains/s3.hostingdost.com/public_html/wp-load.php on line 48" while reading response header from upstream, client: 59.95.171.33, server: s3.hostingdost.com, request: "GET /news/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "s3.hostingdost.com"
----------------------------------------
server {
server_name s3.hostingdost.com;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Output of $_POST variable coming from simple html form
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Array
(
[T1] => 29/06/2011
[T2] => 001
[T3] => John
[S1] => Sample Error description
[errortype] => Form
@gaurish
gaurish / JSON search results from twitter
Created July 3, 2011 19:16
query: IPv6 OR #IPv6 OR IPv6MySite
TWTR.Widget.receiveCallback_1({
"results": [{
"from_user_id_str": "3605200",
"profile_image_url": "http://a2.twimg.com/profile_images/59400677/InsecureEye2-Vlad-SocialNet-480x480_normal.png",
"created_at": "Thu, 30 Jun 2011 23:29:55 +0000",
"from_user": "nmap",
"id_str": "86577231626895360",
"metadata": {
"recent_retweets": 40,
"result_type": "popular"
%PDF-1.3
%âãÏÓ
2 0 obj
<<
/Length 61
6ø)ÍÑÉ•…´4) P(½QPȀāQ˜(ÌÈ€À€À€ÌÈ€À€ÀQ´(Àœ(½LāÌ(ÀQŒ(ÀQÜ(¡�¥Q¨)P)•¹‘ÍÑÉ•…´)•¹‘½‰¨(Ì€À½‰¨(ðð(½AɽM•Ðl½A€½Q•áЁt(½½¹Ð€ðð(½QPȀЀÀH(øØ£ã`B™[™Øš‚È Øš‚‹Õ\H ћ۝\ØÜš\Ü‚‹Ð\ØÙ[
ÍL‹ÐØ\ZYÚ
Í‚‹Ñ\ØÙ[ LL‹Ñ›YÜÈ Ì‚‹Ñ›Û›ÞËLŒ È M Ž MÌ  LÌ—B‹Ò][XÐ[™ÛH ‹ÔÝ[Uˆ ‹ÓX^ÚY MÌŒB‹ÖZYÚ
ŒB‹Ñ›Û˜[YH ÐÛÝ\šY\ŒL]Ú• R][X‹Ó[™Ý H
# ping6 -c 5 ipv6.google.com
PING ipv6.google.com(2404:6800:800b::63) 56 data bytes
64 bytes from 2404:6800:800b::63: icmp_seq=1 ttl=56 time=76.5 ms
64 bytes from 2404:6800:800b::63: icmp_seq=2 ttl=56 time=78.2 ms
64 bytes from 2404:6800:800b::63: icmp_seq=3 ttl=56 time=76.5 ms
64 bytes from 2404:6800:800b::63: icmp_seq=4 ttl=56 time=80.1 ms
64 bytes from 2404:6800:800b::63: icmp_seq=5 ttl=56 time=75.7 ms
--- ipv6.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4040ms
//Variables
var ids = {};
//Start up with document
$(document).ready(init);
//Initilize some stuff.
function init(){
setUpMenu();
setUpSearch();
@gaurish
gaurish / sample.php
Created July 10, 2011 19:33
Mysql PHP - Secure way
<?php
$query = sprintf("SELECT * FROM `User` WHERE UName='%s' AND Pass='%s'",
mysql_real_escape_string($Uname),
mysql_real_escape_string($Pass));
mysql_query($query);
<?php
//mysql extension way
$id = 10;
$rs = mysql_query("SELECT name from users where id=$id");
//PDO way
$stmt = $dbh->prepare("SELECT * FROM REGISTRY where name LIKE '%?%'");
$stmt->execute($id);
root@dev:/home# ping -c 5 dev.udedi.com
PING dev.udedi.com (109.196.60.70) 56(84) bytes of data.
From syrion-to-r2.metro-networks.pl (81.30.128.10) icmp_seq=1 Time to live exceeded
From syrion-to-r2.metro-networks.pl (81.30.128.10) icmp_seq=2 Time to live exceeded
From syrion-to-r2.metro-networks.pl (81.30.128.10) icmp_seq=3 Time to live exceeded
From syrion-to-r2.metro-networks.pl (81.30.128.10) icmp_seq=4 Time to live exceeded
From syrion-to-r2.metro-networks.pl (81.30.128.10) icmp_seq=5 Time to live exceeded
--- dev.udedi.com ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4000ms
<?php
$api_msg = $xml->xpath('//message');
switch(string() $api_msg['type']){
case 'message':
$successful = TRUE;
break;
case 'error':
$successful = FALSE;
break;
}