03 Jan, 2011
Php gzdecode function
Articles related to php gzdecode function
http://digitalpbk.com/php/file_get_contents-garbled-gzip-encoding-website-scraping
.
)
);
$context = stream_context_create($opts);
// Open the file using the HTTP headers set above
echo file_get_contents("http://www.example.com", false, $context);
This should force the server to send a plain response to your client.
Method 2 : Unzipping the contents locally
This method is slower but useful if the server forces gzip output. We can use the
gzdecode function avaliable from
PHP 6.0 or the
gzdecode function definition given in
gzdecode man page on
PHP.net. The code to deflate ...
Published 1 year, 11 months ago
http://digitalpbk.blogspot.com/2009/05/curl-php-windows-unable-load-libcurlphp.html
cURL
PHP Error on Windows
Fatal error: Call to undefined
function curl_init() in D:/webs/
php.php on line 284This problem arises because of not including the lib_curl.dll to
PHP. To solve this uncomment the line as shown below;extension=
php_bz2.dllextension=
php_curl.dll;extension=php_dba.dllNow restart apache server. If you get an error "Unable to Load
X:/path/php/ext/php_curl.dll", copy SSLEAY32.PHPlibEAY32.dll (OpenSSL) Libraries to the System32 folder.Now restart apache server ...
Published 2 years, 9 months ago
http://digitalpbk.com/php/warning-cannot-modify-header-information-headers-already-sent
Solve "Cannot modify header information - headers already sent by *.
php"
Warning: Cannot modify header information - headers already sent by somefile.
php (output started at somefile.
php:###) in somefile.
php on line ###
This Warning is shown by
PHP when you use the header
function to output headers or use the setcookie
function to set cookies after any echo or content which is not inside
PHP tag.
Hello World !!!
Both should throw this warning.
You can disable ...
Published 1 year, 10 months ago
http://digitalpbk.blogspot.com/2009/08/facebook-auth-next-parameter-ie.html
Fix for Facebook authentication on IE
What?This is for Facebook developers who have faced this problem. If you are using an Facebook application to authenticate a user on a
PHP website, the Facebook redirection on Internet Explorer specifically fails the login of the user. This is because the return URL returned by facebook specifically for IE is the appending of the CallBack URL specified in the Application +the Next parameter + a "?" + the auth_token parameter.This results ...
Published 2 years, 5 months ago
http://digitalpbk.com/python/php-sprintf-function-in-python
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);
print $variable;
//OR
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 1 year, 10 months ago
http://digitalpbk.blogspot.com/2009/05/crontab-server-timezone-php-date.html
to set the Timezone in the code written.date_default_timezone_set(Timezone)is the
PHP function to set the Timezone in
PHP. This can take care of most of the timezone anomalies that can occur in your script when using
PHP's Date
Function.Timezone is a string, for example for Indian Standard Time it is "Asia/Calcutta", for LA it is "America/Los_Angeles" etc. Checkout
PHP Timezone list for a complete list of timezones.ShellIn a shell the date command gives you the localtime ...
Published 2 years, 8 months ago
http://digitalpbk.blogspot.com/2007/04/introduction-to-php-part1.html
that follows it until the ;. date is a
function that returns the formatted date and time according to the argument passed to it.The code segment is broken up into statements. Each statement ends with a ; as in C / C++. Variables in PHPAll variables in
PHP start with $. eg: $variable = 10;Unlike C/C++ no data type needs to be mentioned in
PHP. $variable = 10;$var2 = "arun";$var3 = array("asd","gfh");$var4 = false;To read more about the language, built-in
functions and syntax ...
Published 4 years, 9 months ago
http://digitalpbk.com/2009/12/showing-similar-content-nodes-drupal
Showing similar content nodes on Drupal
To show similar content nodes on drupal you have to install the similar module. After installing the similar module
goto admin/build/block Drag the Similar Entries module
OR
If you want to integrate the similar content to the node body, call the similar_content theme
function. print theme('similar_content', $node); on node.tpl.
php
Using the variables available withing node.tpl.
php you can choose whether to display the similar content ...
Published 2 years, 2 months ago
http://digitalpbk.blogspot.com/2007/04/xss-on-yaaricom.html
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.
PHP has such a wonderful list of
functions that can take care of the XSS problem. I wonder ...
Published 4 years, 9 months ago
http://digitalpbk.com/code-ignitor/removing-indexphp-url
Removing index.
php From URL in CodeIgniter
In Code Ignitor by default all URLs except the default home contains
"index.php" by default in the URL, For example http://localhost/index.
php/class/function.
In order to make the URLs "cleaner", we have to remove
"index.php" from the URL. This is done using the mod_rewrite module in apache to redirect all traffic to index.
php/. The following code inside .htaccess does the redirection.
Code Igniter .htaccess Rules ...
Published 1 year, 10 months ago
Related help topics for php gzdecode function
More keywords like php gzdecode function
More pages for php gzdecode function