Thursday, January 10, 2013

Airline app

Fly Delta: If you use Delta for your flights, this app can be very useful. The app allows you to check in for domestic and international flights within 24 hours, download mobile boarding passes (available in 78 cities worldwide), view a seat map and select or change your seat, check the flight status and get terminal and gate information, receive push notifications on flight and gate changes, map flights en route with an interactive flight tracker and many more. Here's the link. From your phone search for "fly delta" and install. Happy travels!

Game

Ruzzle free: This is a fun and fast-paced word game where you can challenge your friends or play against random opponents. The goal of the game is to find the most words in two minutes. You look for words on a board by swiping your finger across the screen. The letters may form words as long as they are connected to each other. The game has nice audio and animations. Here's the link. From the phone search for "ruzzle free" and install.

Science app

NASA: If you're interested in NASA or science in general you have to have this app. You can find the latest images, videos, mission information, news, feature stories, tweets, NASA TV and featured content. The app has over 157,000 images, On Demand NASA videos, launch information and countdown clocks, orbiting satellite tracker and more. Pretty cool. Here's the link. From the phone search for "nasa" and install.

Wednesday, January 9, 2013

Website image is not shown in Facebook share

Error

Your website image is not shown when sharing on Facebook

Solution

Don't retry on facebook news feed since it is cached

#1

Try to invalidate the cache, check my previous article

http://karim-ouda.blogspot.com/2011/10/how-to-refresh-url-entries-in-facebook.html

#2

Add facebook meta-tags in your page "head", and try again

<meta property="og:url" content="YOUR_STUFF" />
<meta property="og:site_name" content="YOUR_STUFF" />
<meta property="og:type" content="website" />
<meta property="og:title" content="YOUR_STUFF" />
<meta property="og:description" content="YOUR_STUFF" />
<meta property="og:image" content="THE_IMAGE_TO_BE_SHOWN">

NOTE: facebook has some requirements in images, first make sure it is more than 200x200 in dimension

#3

If all the above didn't work, you will need to do some debugging

Go to this link ( facebook debugger) and past your site link, and check the errors, warning, and all the great information of how facebook sees your webiste

https://developers.facebook.com/tools/debug

#4

Also check server logs

"HEAD /images/close-icon.png HTTP/1.1" 206 337 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

Note: HTTP 206 response code is ok, it is part of multiple partial downloads of the image




Tuesday, January 8, 2013

Empty $_SESSION after PHP redirect using GET or CURL (not browser)

Error

Empty $_SESSION after PHP redirect between 2 scripts, the first script is called using GET or CURL (not browser)

Steps

1- Call "script1" using GET or CURL
2- "Script1" starts/fills session X, does some logic, redirect to "Script2"
3- In "Script2", print_r($_SESSION) is empty

Solution

I found that the SESSION in "Script2" is a NEW session, let's call it:Session Y , since Session X was not transferred in HTTP header in the redirect

So it seems that the SESSION information transfer in headers was being done by the browser and it is not done by GET or CURL command line, 

So we need to do it instead


Step 1:

In Script #1, change the redirection to be 

header("Location:$targetPage?".SID);

SID is a constant containing the following

PHPSESSID=oilq46ge4e2f76774qcg8gi3d1


Step 2:

In script #2, start the script with the following

session_id($_GET['PHPSESSID']);
session_start();


So you are telling the script to load Script1's session

That's it


Final note 

You may have a different issue too, check this post

http://karim-ouda.blogspot.com/2012/04/php-session-empty-after-header.html


Keywords

Redirect PHP command line new $_SESSION  GET session_id start_session browser PHPSESSID cookie  CURL  Set-Cookie HTTP header

Wednesday, January 2, 2013

Disney World app

Disney World Wait Time Lite: If you are lucky enough to go to Disney World soon, you'll need this app. It allows you access to real-time wait times for all the rides and also maps for all the parks. The times are updated constantly and will help you manage your time better. Very nice app. Here's the link. From the phone search for "disney world wait time lite" and install. And a personal advice: if you go to a park early, go to the rides at the back of the park. There's barely anyone there (people start with the closest rides). Your welcome!

File recovery app

Dumpster-Recycle bin: This can be a very useful app. It works just like the "recycle bin" on your computer. It allows you to recover deleted pictures with a single tap. It actually works with more than just pictures. You can recover music files, videos and other kinds of documents. The app lets you preview the pictures before recovery. And, you can set up an auto-clean for the app so you don't have to worry about tons of junk accumulating there. According to the developers, soon you'll be able to recover deleted contacts and text messages. Here's the link. From the phone search for "dumpster" and install.