Archive for the ‘Programming’ Category
[PROJECT] First year C project GOAL Equivalent to Football of Motorola C168
I love to play games. And football is one of my favorite. It was the season of World Cup when this Project was presented. My team(We were Five) decided to make a game name GOAL which was equivalent to the game that we used to play on the mobile Motorola C168. I want to make this project free and available to everyone.
[HOW TO]: Fetch a certain part of HTML, Text or PHP From Outer Source With PHP
I am going to teach you how to fetch certain part of HTML, Text or PHP for any outer source(i.e. From a website). Please read all the contents clearly. You most have a problem to fetching a certain part of HTML or PHP because Text files are more easy to handle. We here do not fetch the PHP code but we fetch the HTML code after the code is published in a website. Those code are HTML codes most and your can easily view in the source. But the main problem with the user are they cannot fetch the code although all the code is found to be correct. The code that I use is given below:
<?php
$contents = file_get_contents(‘http://www.example.com’);
$term_search=”The term to be searched”;
$no_term=1000;
$pos=strpos($contents, $term_search);
$pos += strlen($term_search);
$new_pos = substr($contents,$pos,$no_term);
echo $new_pos;
?>