Tuesday, May 5, 2015

Text Mechanic.co - Keyword Suggestion Generator tool

Today, I came accross the greatest keyword suggestion generator tool which is Text Mechanic's Keyword Suggestion Generator tool. It works great, it is efficient, and extremely helpful.

According to textmechanic.co,

The Text Mechanic's "Keyword Suggestion Generator" will retrieve Google.com auto suggest results* for your entered seed text in an easy to investegate format. Seed text can be a letter, number, word, phrase, related to what you (and others) are querying to find in Google search results.

Enter seed text into the seed text field and click "Submit" button. Results will load here. Click on a result to open a Google.com search window for that result. Can't think of anything for seed text? Just click the "Random" button for a random seed word.

Click "Prefix" or "Suffix" button to prefix/suffix exisiting seed text with the letters a to z. Query rate will vary between 2.5 to 4.5 seconds. When suffix seeding, place a space at the end of exisiting seed text to query last word as a full word. Prefix seeding is tricky and only gives numerous results on web search. Seeding a single word use no front space. Seeding two words or a partial phrase, place a space before the first word. Trial and error is a must.


Keyword Suggestion Generator


How to redirect the whole page when you submit a form in an iframe

Thanks to this post on StackOverflow, I found to redirect the whole page when you submit the form with an iframe inside.

Problem: You have an iframe which got a form, when you use the iframe to submit the form, the page will not redirect normally and this might cause some behavior which you don't like.

Solution: Add target='_parent' to the form.

Example:  <form action="/signup" method="post" enctype="multipart/form-data" target='_parent'>

You don't have to add anything to the iframe. This should work.

12 reasons you should always use CloudFlare

Who would have thought that in this huge internet revolution, there would be a free unlimited CDN service? No one! Today, in 2015 there is a free CDN service and it works great.

It is the one and only... CloudFlare.

CloudFlare, a US-based company headquartered in California, which provides a content delivery network service. Its network protects, speeds up, and improves availability for a website or mobile application with a simple change in DNS.

Here are 10 reasons why you should consider linking your website to CloudFlare.

-1- It's free.
You already knew that from the introduction. Cloudflare could save you hundreds of TBs, millions of requests, provides you security and protection and boost up your site and it's all absolutely for free. This is the first reason why you should consider CloudFlare. While more advanced options cost money, it isn't really important for you can run your website with a free version of CloudFlare.

CloudFlare has many competitors like MAXCDN and others, but they charge you per TB whereas on CloudFlare it is free.

-2- It is easy to setup
Here is an experiment you should do, say those words loudly:
  • One, two, three, one, two, three, drink
  • One, two, three, one, two, three, drink
How hard was that? Yeah, exactly. CloudFlare is as easy to setup as singing those words. No rocket science needed, no programming skills needed, no credit card needed, get started in less than 5 minutes.

All you have to first is input your domain in the text field, then you can follow easy instructions, and change the nameservers in your registrar; heck even CloudFlare will copy your DNS settings automatically. You site will be running through CloudFlare and boosted up in less than 5 minutes.

-3- It protects you against attacks
CloudFlare does automatically protect you against any a denial-of-service (DoS) or distributed
denial-of-service (DDoS) attack. You will sleep at night knowing that threats will be handled and blocked by CloudFlare.

CloudFlare on the next day will show you all the threats they have blocked. Imagine if you were actually unprotected and you suffer from a DDoS attack. Dog help you then.

CloudFlare reported that it uses the collective intelligence of its community to get smarter. CloudFlare’s network learns from every new attack and then shares that information with the rest of the CloudFlare community. That means new threat gets recognized in CloudFlare for future attacks.

-4- It speeds up your website
On average, a website on CloudFlare loads twice as fast, uses 60% less bandwidth and has 65% fewer requests. 

It automatically activates asynchronous resource loading, force aggressive GZIP, auto-minimize HTML, CSS, and JavaScript files everywhere.

It also distribute all your tiny files to all their servers around the globe (CDN), speeding your website to the extreme maximum, all that for free.

-5- It has great and reliable analytics
You think Google Analytics are the best and the most efficient way to track your analytics? Think again! CloudFlare analytics simply rock and they overcome normal analytics like Google Analytics.

Cloudflare are 100% confident in the hits and unique visitors numbers on CloudFlare are better than Google Analytics, and have the raw logs to back them up. 

-6- One-Click install app
You can install many apps for me within one-clikc, for example you can install Google Analytics, submit your site to webmasters.

Some apps include: Infolinks, Pingdom, Vukkle, Smart Errors, Panopta, GamaSec, Dakwak, CodeGuard, Better Browser, etc...

-7- Your server's IP will be hidden
Many of you would like to have their privacy, right? There are 59,423 services online which are dedicated in revealing who is the server company hosting your content. 

Without CloudFlare, assuming you've turned on the gray tick, no one will reveal your true server's IP or your server's host

-8- Your site will stay online when your server goes offline
Unless you're Google, Facebook or Amazon, your server will go down; there is no escape about it.

Cloudflare's Always Online keeps your site available even if your server goes down. If your server goes down, CloudFlare will serve your site's most popular pages from their cache. As soon as your server comes back online, CloudFlare will move users back to regular browsing.

-9- Free, secured, updated, one-click install HTTPS certificate
Would you believe it if I tell you with one-click you can install and activate the https certificate? You don't need to configure anything with your server, nor install or uninstall anything. Your site will have a working and fast https certificate which gets automatically updated online.

You can also choose between Flexible SSL, Full SSL, Full SSL (Strict).
Cloudflare also uses Universal SSL.

-10- Set page rules easily in your website 
You can forward, set a custom cache level and exclude certain CloudFlare settings and apps. You can force https on certain links, bypass cache on other links, and change hundreds of settings like forwarding, custom caching, expire TTL, always online, apps, performance, mirage 2, rocket loader, security, SSL, security check, browser integrity check, etc...

-11- Get help when you're under attack
While CloudFlare automatically blocks normal attacks and normal threats. Some users target you, and they won't stop until they exhaust your website and turn it down. CloudFlare helps you with the "Under Attack Mode".  Advanced and complicated security features you find them on Amazon and Google only. This feature is really great, though you might have to upgrade your account. 

-12- Take CloudFlare anywhere with you
With the unofficial app iFlare, available on the App Store, you can configure your account,  view analytics and take CloudFlare with you wherever you go. It costs only 1$ but it is all worth it.

iTunes description for the app is: iFlare for CloudFlare™ makes it easy to manage your CloudFlare™ account with your iPhone.

Sunday, May 3, 2015

Display number of subscripers on a video page in ClipBucket

ClipBucket is the fastest growing video script which was first started as Youtube Clone, it is not that excellent but it the best around here.

Developed by Arslan Hassan originally, a brilliant programmer who later turned the project into tune.pk, an unblocked YouTube clone in pakistan, Arslan made a fortune out of his projects. 

One of clipbucket problems is that it doesn't show the number of subscribers on a video page.

Many users who are cloning YouTube or would like to create a script similar to YouTube would love to show the number of subscribers in the script.

Fortunately, since I examined every piece of code in clipbucket, I easily know how to do it, it is extremely simple.

First go to watch_video.php and add the following:

//Getting the user information - Read more: BLOG.GEORGECHALHOUB.COM
echo $u = $vdo['username'];
$u = mysql_clean($u);
$udetails = $userquery->get_user_details($u);
//End Getting the user information

Then go to watch_video.html and add the following smarty line where you want to display the number:


That's it. It is pretty simple. The code should any version of clipbucket: 2.0 - 2.1 - 2.6 - 2.7.

Wednesday, April 29, 2015

Irritatated by irrationality on skeptics.se

Here is a famous picture of Richard Dawkins irritated by irrationality:

richard dawkins irritate by irrationality

I have a person known to have a strong heavy and strong basis toward atheism. My account description was once:

You are not a believer. You shall not believe in delusions and superstitions. People are born, they grow old and then they die. That's the world we live in. There's no magic, no mysticism, no immortality, no god, no jesus, no sixth sense, no witchcraft, no omens, no prophecies, no real astrology, no extrasensory perception, no vampires, no angels, no miracles, no ghosts, no psychics, no heaven or hell. The supernatural does not exist nor it will ever will. There is nothing that defies rational thought. You are not a believer. You can't be.

And this is how I lived my life starting the age of 16. I am a skeptical person in my nature; I love scientific skepticism. I fell in love at first sight with skeptics.se. My experience was good and bad at this site.

The site is full of religious people, most of them are respected people with high level of scientific skepticism; I don't mind that at all and I respect every religious people as well as I respect their religion. But I get irritated by irrationality sometimes when they post non-scientific stuff.

One member complained once about Richard Dawkins advertisement, and got it removed from the site:

Another member said vaccines are equal to miracles:

On this post I said that miracle questions should be off-topic:

 Guess which response I got: Vaccines are not different than miracles. I got irritated but remained calm.

And so on...


How to copy files/folders from a server to another server using SSH

I bought a new server for my programming site ifelse.tv, the server company who was renting me their servers has promised to partition my server in a way I could have 2TB of data storage.  I only had 1TB of data storage. I messaged them and they broke the news, they made a mistake and they need to re-format and repartition the server.

I have had uploaded already 150GB of video files, but I wasn't ready to give them up. I wanted a fast, quick and efficient solution.

The quickest and cheapest solution was to copy the 150GB of video files to another server, then add them back when they fix your server.

Both servers had a 100Mbps unmetered internet. That would make on average 14MB/sec. Not bad for 150GB of content files.

The only question was how to do it? Google helped me find my solution and this is how I did it.

1. Login to the server which has files you need backup via SSH. It doesn't matter if you have root access or not:

2. Execute this command (some changes need to be made):
scp -r --ignore-existing /home/admin/domains/s1.ifelse.tv/public_html/ifelse george@

scp (constant): This will copy files from server to server.
 --ignore-existing (contsant): This will sometimes ignore the existing files.
-r (constant): means, recursive, it will copy all subfiles and files inside the folder.
/home/admin/domains/s1.ifelse.tv/public_html/ifelse (variable): The folder or file you need to backup.
george@ (variable): The destination server. As you see, I didn't enter the root account.

/home/george/ifelse (variable): The destination folder on the other server (make sure you create one). 

3. It will ask for the other server's password, enter it:
4. It will begin copying files:

You should leave it for work, as it might take a lot of time. This works pretty well.

Good luck!

Saturday, April 25, 2015

My top 10 favorite songs of all the time

Here are my top 10 songs of all the time:

10) Elissa - Ayshalak

Arabic music is not really my thing. But Ayshalak is different, it has Western Influence. Ayshalak, the main song of Elissa's third album "Ayshalak" was a huge commercial success. Elissa, the famous pop-diva in the Middle East, turned song upside down with her beautiful voice. Unforgettable song.

9) Kodaline - All I Want

This song was featured by Google; that's how got I to know the song. It had me at the beginning: "All I want is nothing more. To hear you knocking at my door. Cause if I could see your face once more. I could die a happy man I'm sure. When you said your last goodbye."

8) Coldplay - Viva La Vida

Viva La Vida is possibly Coldplay's most successful song ever. Coldplay's wikipedia page is twice larger than Kanye West's entire wikipedia page. The lyrics to the song contain historical and Christian references, and the track is built around a repeating string section in unison with a digital processed piano with a timpani background. This song alone sold 7.1 million copies worldwide and has a grammy award. The song is dope, it has been played everywhere and covered by hundreds of artists.

7) Evanescence - Bring me back to life

Along with Immortal, this song is Goddess, bring me back to life is one the hottest rock songs ever written in history.  It also features guest vocals from Paul McCoy of the band 12 Stones. Wind-up released "Bring Me to Life" in 2003 as the lead single from Evanescence's debut studio album, Fallen. The song delivers genres from alternative metal to rap rock and gothic metal, and is considered a nu metal classic. The band won in the category for Best Hard Rock Performance at the 46th Grammy Awards where the song was also nominated for Best Rock Song.

6) Loreen - My Heart Is Refusing Me

Phenomenal and original song. Amazing underrated song. Did not get the justice it deserves. Well, at least 50 million views were expected in the song. The song peaked to number 9 on the Swedish Singles Chart. She co-wrote the song with Moh Denebi and Björn Djupström.

5) Foxes - Let go for tonight

Let Go for Tonight is a song by English singer and songwriter Foxes from her debut studio album Glorious (2014). The song was released as a digital download in the United Kingdom on 23 February 2014 as the album's second single. It entered the UK Singles Chart at number 7. This is the most underrated song of all the time. It deserved at least 100 million views. The talented singer who dropped out of college for good, was attacked and criticized for not being beautiful. 

4) Hurricane - 30 Seconds to Mars

The song was written by lead vocalist and songwriter Jared Leto and produced by Leto, Flood and Steve Lilywhite. The sexual and controversial music video got banned by MTV.

3) Skillet - Comatose

Skillet had it made the song for Jesus, but I people have interpretations for it. Comatose is the seventh full-length album released by the Christian rock band Skillet. Released on October 3, 2006, this album continues their previous album's trend of downplaying the keyboard elements that were prominent in previous releases in favor of more orchestral elements and distorted guitars. Comatose has sold over 500,000 units and has been certified Gold as of November 3, 2009, their first record to do so. On December 6, 2007, the album also received a Grammy Award nomination forBest Rock or Rap Gospel Album. A deluxe edition of Comatose was then released in stores on December 26, 2007 and a live DVD of their headlining tour in support of the record was released in the fall 2008.

2)  Another Love - Tom Odell

British talent. This song is legendary; once I listened to it, my life was never the same. Two years after it has been released, I have listened to the song and once I did, the rest is history. The song peaked at number 10 on the UK Singles Chart; the song also charted in Belgium, Ireland and the Netherlands. It became Odell's first top 10 hit in the UK after it was placed at number 10 in the single chart on 29 June 2013.The song was used in the episode "Do You Remember the First Time?" of season 6 of The CW series The Vampire Diaries.

1) Chandelier - Sia

That was obviously predictable. I already have a blog post for the song chandelier.  It was written by Sia Furler and Jesse Shatkin. For me, Chandelier is the best song ever written in history, better than John Lennon's imagine, better than any Metallica song, better than any Micheal Jackson song, better than any Madonna's song, it is the best song ever in the history of music. The song was supposed to go to Rihanna but it was so personal Sia couldn't give it away because the song appeared to be personal for Sia. In the United States, the single peaked at number 8 on the Billboard Hot 100, becoming Sia's first single to appear on the Hot 100, as well as her first top ten single as a lead artist on the chart, and has sold over 2 million copies in the country. The song received four Grammy nominations for Song of the Year, Record of the Year and Best Pop Solo Performance, with its video receiving a nomination for Best Music Video at the 57th Grammy Awards. A music video for the song was directed by Sia and Daniel Askill, while it was choreographed by Ryan Heffington. It features Maddie Ziegler performing the choreography. In support of the single and 1000 Forms of Fear, Sia performed "Chandelier" on a number of shows including The Ellen DeGeneres Show, Late Night with Seth Meyers and Jimmy Kimmel Live!

Friday, April 24, 2015

Breaking News: ExoClick Bans Publisher Accounts for No Reason

Whether you are an Advertiser looking for a new source of traffic or a Publisher that is looking to generate more revenue, ExoClick.com is your solution!

This is the moto of ExoClick.com on twitter. 

ExoClick is most of the most successful internet advertisements companies in the world, yet ExoClick is one of the most greedy, unloyal and unethical company I have ever worked with. ExoClick should be sued soon.

After having almost 200$ on my ExoClick account, I couldn't login for no reason:

Note that I have never engaged myself in any click-fraud, ever. 98% of my traffic was organic. And I receive provide 100,000 monthly daily impressions for exoclick.

I have 200$ in my account, I was banned without any reason. Apparently, exoclick bans members without any reason, this not the first time, this is how exoClick works, take a look.

Exoclick bans your account if you send traffic from low-paying countries, yes it is true. Here are the evidence I found online:

Case 1: Exoclick banned this user's account because "the clicks aren't worth much".

Case 2: Banning without reason

Case 3: Banning without reason

And so on...

Exoclick should be avoided and not used. 

Wednesday, April 15, 2015

The most efficient way to delete all rows of a table in phpmyadmin

The most efficient way to delete all rows from phpmyadmin or from the mysql command line is obviously using Empty the table (TRUNCATE) from phpmyadmin (or the command TRUNCATE).

If you attempt to delete all rows using normal mysql queries, your database is more likely going to freeze and the server might crash also from memory outage.

The "Delete data or table" box can be found from the "Operations" tab. Make sure you select TRUNCATE to delete all the rows. Using DROP will get rid of the table itself, which is a rare thing to do.

Tuesday, April 14, 2015

The best way to redirect a page using php

There are possibly 101 ways to redirect a page from a php script, but mostly and most importantly there is one famous method which is the most efficient, the fastest and the safest solution which is:

header("Location: http://example.com/myOtherPage.php");


That's it, you only have to change the url in the code into the url you would like to redirect to.

You also need to make sure that you don't echo any variables before you do the redirect, otherwise you will get an error. 

For more detailed information, check this answer on StackOverflow.com/

Sunday, April 12, 2015

Tom Odell - Long Way Down [Review]

I am known to be a music addict, who listens to almost any type of music, I get attached to some albums and I hate some other albums. But there are some albums which leave a trace in my heart, they mark their existence, those albums are legendary for me and I would never forget them.

Among those albums there is this album by Tom Odell called Long Way Down. Odell composed all the songs, he's one of the greatest musicians and songwriters I have ever known. This indie pop album is legendary, unique, soft and professional. It just shows how genuine Tom Odell is.

I will review the album song by song.

Track 1: Grow Old With Me
This song has already its wikipedia page. It is very romantic, starting with: "I can feel you breathing, with your hair on my skin, as we lie here within the night." It has been criticized for having a sexual context when he said "Make me hard, make me cum". Obviously, this is a song about being in love with someone and having a good relationship.

Track 2: Hold Me

"Hold Me" was written by Francis Anthony Eg White, Tom Odell. It is a great track, it has its own music video here. This song is also happy; it is about Tom being genuinely in love with someone, his vocals explode in this song especially at this part: "When you hold me, hold me in your arms, oh when you hold me, I can feel your heart, oh when you hold me, when you hold me in your arms, oh when you hold me, yeah I can feel your heart beating".

Track 3: Another Love
My favorite song in the album. This is main, most famous and successful track of this album. Another Love is a piece of art, a song which I would never forget. It is one of the most beautiful songs I have ever heard. If I want to list in a list of one of my favorite songs of all the time, it would be among the top 5. It has been covered thousands of times, and sang into more than 10 music competitions.  Unlike the first two songs, it is a sad song featuring an angelic voice with a broken heart. It has been featured on the Vampire Diaries. In the song, he talks about feeling love for one of his past partners, and how he can't feel about anything anymore for his current love, "another love, all my tears have been used up on another love, another love, all my tears have been used". you".

Track 4: I know
Great song, in this one his partner has dumped him making it ‘all over’, however in the verses he is still romanticising their relationship and the joy he found in the partner. Tom is portraying the present and the past: highlighting the contradiction between the two. He goes on saying "I know that you told, I know that it's all over, and I know I can't keep calling, that everytime I can keep on falling on you".

Track 5: Sense
This is a very calm and low song, being the longest track in the album, at a length of 4 minutes and 25 seconds.

Track 6: Can't Pretend
Good song also. Tom says "Love, I have wounds, only you can mend, you can mend. I guess that's love, I can't pretend, I can't pretend."

Track 7: Till I Lost
My fourth favorite song in the album. Tom jumps from a low song to very high and energetic song, full of life and energy. It makes you reach a level of chills when he says "But ohhhhhhhhhhhh, I didn't see the sea until I crossed, ohhhhhhhhh, and I didn't feel your love until I lost". Of course, he means that he didn't appreciate his love until he have moved on just as I have ignored many things along the way that were precious and beautiful. It is a very euphoric, and hot song!

Track 8: Supposed to Be
Odell goes to being calm again. I've got to admit this is my least favorite of this album. In the song, he's reminiscing the memories he had with a girl, saying it was always supposed to be like that and nothing could change.

Track 9: Long Way Down
Amazing song also. It is the title track of Tom Odell's debut album. He's begging his partner not to leave, "It's a long way down, you know it's a long way down, feels like a long way down, love it feels like a long way down, so honey don't leave, don't leave, please don't leave me now".

Track 10: Sirens
Euphoric song too. Odell is hearing only Sirens. The hook goes here "Or we'll be, all run run running away, we'll be, all run run running away, all run run running away, when sirens they come our way". This song did not get the justice it deserves as far as I am concerned.  He wants to run away with his love obviously in this song.

Track 11: I Think It's Going To Rain Today
Odell goes back to being calm again. This song plays only on piano. This is a very sad and depressive song by Tom, he says in it "Lonely, lonely, tin can at my feet, think I'll kick it down the street, that's the way to treat a friend, bright before me the signs implore me, to help the needy and show them the way, human kindness is overflowing, and I think it's going to rain today".

Track 12: Storm
My second favorite song of the album, I have overdosed on it and listened to it more than 1,000 times at least. Three minutes and 9 seconds of pure euphoria and unique melody, something you have never listened to before.  After "I need one of these storms, One of these storms, One of these storms, To wash me clean". Really great track.

Track 13: Heal
Tom Odell's heal is my third favorite song of this album. When I feel low I listen to it, it is very romantic, calm and sad. It has been featured at the end of the movie If I Stay, where the song left everyone with tears.

And that's my review for Tom Odell's Long Way Down. One should really buy a physical version of the album instead of downloading tracks online, because the album had inside a text books of lyrics of songs written by Tom:
What a great album.

Monday, March 16, 2015

Solution for file_get_content returning gibberish content

In case you're looking for the solution and you don't care about the coding, it is in bold red.

Recently, I wanted to use StackExchange API where I wanted to extract some data for some purposes. I decided to use the file_get_contents method. But, surprisingly, all I could get was gibberish content with weird characters.

The code I was using was this:

echo $html =  file_get_contents("http://api.stackexchange.com/2.1/questions/27049?site=skeptics");

Really simple and straight to the point, just one line of code.  What I would get surprisingly is something like this:

‹ •’ÁŽ›0 †_ÅòaO H€ ¢½TªÔK«öÐCU!ÇLÀ ØÔ B¢h¥¾F_¯OÒ1$Û½ö6öÌ|3ÿo߸Bè /¿Ý8ŠÆ ¼ ]ƒåß n&MAyã † *£y¹Î¶ ØJÕ¼ÜdI‘ßÏx €—TÜ(‡`¡æ ¬9ª *Õ‹Æ'[ÄÁ•Q4MÓª±â,PØ•4}´„Q²‹óÝ6_ïdždñq—¦Ûc½Ž‹x› ùñ ŸÝ~½ÉŸê½ªA£’F?Ùý§÷4©VnèĵҢ÷ƒ>à ¤ ìÊ}A£ÁQI§ôé¾ ­àN0 Á­ y‚‹l…n`^ÆËqѬ-² (ü º…ó på*¡Ý4k,ÑŽ 𳂩’fÔè-*’€/ ¯w wÒXZmMa' VB¢:+¼Vµ@Ÿn¶Y’ ù+-Ìv¿M­7YJ©Ÿ#¸95Û¿‹Óâ?„=šIœïŒj . !ZZvy÷p2½Ð¡Ò¡é®ý D8 ×*ݐøЂ u†ðhH Cb’éJ#Q f$QaçýGd&Ø 2›ÉLiöq! ìë+šÝÑìfÿÐÌ£‘ kª¡ \ ãF …-x.è?¿~;æZC–Sƒ®YgH»eÖ˜þ™¿Ðon…«úù Ž¢sà4(ª^\x™Äñãl¡§©´•w7ù qUb_"

So, I looked everywhere on my server and on the internet and I couldn't find a solution. It turns out the lines above you see aren't gibberish, they are gzip encoded data.  The proof was simple, just try to run this code


You will see this:

Array ( 
[0] => HTTP/1.1 200 OK 
[1] => Cache-Control: private 
[2] => Content-Type: application/json; charset=utf-8 
[3] => Content-Encoding: gzip 
[4] => Access-Control-Allow-Origin: * 
[5] => Access-Control-Allow-Methods: GET, POST 
[6] => Access-Control-Allow-Credentials: false 
[7] => X-Content-Type-Options: nosniff 
[8] => Date: Mon, 16 Mar 2015 23:41:57 GMT 
[9] => Content-Length: 511 

Aha, the fourth element of the array is gzip as you see. The solution is to do the following:

$html = file_get_contents("http://api.stackexchange.com/2.1/questions/27049?site=skeptics"); 
echo gzinflate(substr($html,10,-8));

Now, this will definitely work, I guarantee, this is what I got:

{"items":[{"tags":["gender"],"owner":{"reputation":161,"user_id":25398,"user_type":"registered","profile_image":"https://www.gravatar.com/avatar/370876817c8350f7446fd10906598fbc?s=128&d=identicon&r=PG","display_name":"Rebecca J. Stones","link":"http://skeptics.stackexchange.com/users/25398/rebecca-j-stones"},"is_answered":true,"view_count":1644,"answer_count":1,"score":12,"last_activity_date":1426534996,"creation_date":1426512546,"question_id":27049,"link":"http://skeptics.stackexchange.com/questions/27049/does-a-transgender-woman-in-olympia-washington-receive-frequent-complaints-abou","title":"Does a transgender woman in Olympia, Washington receive frequent complaints about indecent exposure in the women’s showers and locker room?"}],"has_more":false,"quota_max":300,"quota_remaining":272}

What does this mean?

We you use a famous, overused PHP function like file_get_contents() to fetch a remote webpage, it doesn't send any http headers by default! The remote server's job is to check if you (the requester of the data, aka your server) supports compression over http (known as HTTP_ACCEPT_ENCODING).

Now it is very likely that no headers were sent with your request, the server shouldn't have replied with gzip encoded data, but they are doing so. So, it is StackExchange API fault a bit. 

Anyhow, you got your solution now, let me know in the comments if you still have a problem!


Sunday, March 8, 2015

Do not set timeout in httpd.conf to 0 (ZERO)

Apache, the most popular web server on the planet, is mainly configured by placing directives in plain file httpd.conf !

In httpd.conf you will find  in /etc/httpd/conf/httpd.conf by default this:

# Timeout: The number of seconds before receives and sends time out.
Timeout: 60

Do not ever think that by replacing 60 to 0 you will have unlimited timeout for recieves and sends!

By placing it to 0, you will prevent your server from sending any file to your server (mp4, css, js or anything). In other words, no resources will be accessible from your server.

If you have set it to 0 once like I do, you should revoke it and restart your server.

You can set it to 9999 if you desire but never 0.

For useful up-to-date information you may see this.