<?php $file = 'database/short-link.txt'; $content = file( $file ); if( !empty( $content ) ) { foreach( $content as $url ) { $short = explode( "|", trim( $url ) ); if( $short[1] == "http://tamira.peacockindia.in/Gie8xQ" ) return $short[0]; } } ?>