...

View Full Version : Can't Get This Script to Work



ojsimon
02-16-2008, 07:48 PM
Hi
I found this code in a forum and have been trying to make it work, i am getting the error message
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/ojsimon2000.freehostia.com/minifetchforum.php on line 9'
Can anyone help me with this?

Thanks


<?php

//*Mini-Fetch*-*Remote*Content*Retrieval*System

//In*this*case,*it*fetches*a*search*for*"fresh*content"*from*www.alltheweb.com,*whom*we*hope*you*will*visit.
$theLocation="http://en.wikipedia.org/wiki/Php";
//Below,*at*$start*and*$finish,*you'll*enter*the*start*and*finish*points*in*the*remote*HTML.

$startingpoint*=*"<link rel=\"copyright\" href=\"http://www.gnu.org/copyleft/fdl.html\" />";*//*replace*inside*the*quotes*with*with*your*unique*start*point*in*the*source*of*the*HTML*page.*It*HAS* to*be*unique.
$endingpoint*=*"<div id=\"footer\">";*//*replace*with*the*unique*finish*point*in*the*source*of*the*HTML*page*
//Don't*forget*to*escape*any*"*marks*with*a*\*mark.
//*Example:*If*the*starting*HTML*is:*<img*src="images/something.jpg">
//*You*would*tell*Mini-Fetch:*$startingpoint*=*"<img*src=\"images/something.jpg\">";

//That's*probably*all*you*need*to*edit,*unless*you*want*to*match*and*replace*certain*text*or*HTML.

//*-*"Don't*touch*this*part..."
preg_match("/^(https?:\/\/)?([^\/]*)(.*)/i",*"$theLocation",*$matches);
$theDomain*=*"http://"*.*$matches[2];
$page*=*$matches[3];

$fd*=*fopen($theDomain.$page,*"r");*//*can*change*to*"rb",*on*NT/2000*servers,*if*problems.
$value*=*"";
while(!feof($fd)){
$value*.=*fread($fd,*4096);*
}
fclose($fd);
$start=*strpos($value,*"$startingpoint");*
$finish=*strpos($value,*"$endingpoint");*
$length=*$finish-$start;
$value=substr($value,*$start,*$length);
//*end*"don't*touch*this*part"


//*eregi_replace,*below,*is*a*case-insensitive*function*to*find,*match,*and*replace*variations*of*text*that*you*define.
//The*following*commands*strip*or*replace*HTML*tags.*
//To*NOT*strip*a*certain*HTML*tag,*add*//*before*the*line*in*question.
//*the*"",*before*the*$value*at*the*end*of*the*line*means*replace*the*tag*with*blank*space,*which*effectively *deletes*the*tag.

//*$value*=*eregi_replace(*"<img*src=[^>]*>",*"",*$value*);*//*Remove*all*image*tags.*This*is*disabled*until*you*remove*the*//*in*front*of*this*line.
$value*=*eregi_replace(*"<IMG*alt=[^>]*>",*"",*$value*);*//*Remove*all*image*alt="whatever"*tags
$value*=*eregi_replace(*"<class[^>]*>",*"",*$value*);*//*Remove*all*variations*of*<class>*tags.
//$value*=*eregi_replace(*"<table[^>]*>",*"",*$value*);*//*Remove*ALL*variations*of*<table>*tags.
//$value*=*eregi_replace(*"<tr[^>]*>",*"",*$value*);*//*Replace*<tr>*tags*with*blank*space.
//$value*=*eregi_replace(*"<td[^>]*>",*"",*$value*);*//*Remove*all*variations*of*<td>*tags.
$value*=*eregi_replace(*"Signed*up*teams[^>]*>",*"",*$value*);



//*Below*-*what's*the*difference,*you*ask,*between*eregi_replace*and*str_replace?
//*str_replace*is*faster,*by*a*long*shot...*The*catch*is*that*in*can*only*be*used
//*to*replace*EXACT*value*matches,*as*you*see*below,*and*doesn't*work*well*in*huge*files*without*using *arrays.
$value*=*str_replace(*"</font>",*"",*$value*);*//*Remove*closing*</font>*tags.
//$value*=*str_replace(*"</table>",*"",*$value*);*//*Remove*closing*</table>*tags.
//$value*=*str_replace(*"</tr>",*"",*$value*);*//*Remove*closing*</tr>*tags.
//$value*=*str_replace(*"</td>",*"",*$value*);*//*Remove*closing*</td>*tags.
//$value*=*str_replace(*"<center>",*"",*$value*);*//*Remove*<center>*tag...
//$value*=*str_replace(*"</center>",*"",*$value*);*//*...alignment*calls.
$value*=*str_replace(*"<b>",*"",*$value*);*//*Remove*<b>*tags.
$value*=*str_replace(*"</b>",*"",*$value*);*//*Remove*closing*</b>*tags...
//$value*=*str_replace(*"<table*style=\"width:100%;padding:4px;border:1px*solid*#000;background:#7e661c;color:#fff;\">",*"<table*align=\"center\"*border=\"0\"*cellpadding=\"4\"*cellspacing=\"1\"*class=\"alt1\"*width=\"100%\">",*$value*);
$value*=*str_replace(*"<td>No</td>",*"",*$value*);
$value*=*str_replace(*"<td*style=\"font:12px*Arial,sans-serif;color:#fff;\"><b>PAID</b></td>",*"",*$value*);
$value*=*str_replace(*"<td>No</td>",*"",*$value*);
$value*=*str_replace(*"<a*href=",*"<a",*$value*);
$value*=*str_replace(*"<table*style=\"width:100%;padding:4px;border:1px*solid*#000;background:#7e661c;color:#fff;\">",*"<table>",*$value*);
$value*=*str_replace(*"</body>",*"",*$value*);
$value*=*str_replace(*"<td*style=\"font:12px*Arial,sans-serif;color:#fff;\">",*"",*$value*);
$value*=*str_replace(*"PAID",*"",*$value*);
$value*=*str_replace(*"<td*colspan=\"3\"*style=\"font:12px*Arial,sans-serif;color:#fff;\"></td>",*"",*$value*);
$value*=*str_replace(*"</td>DIV</td>",*"",*$value*);
$value*=*str_replace(*"TEAM*NAME</td>",*"",*$value*);*



//*More*tags.*Just*take*out*the*//*in*front*and*edit*as*you*like.
//$value*=*eregi_replace(*"Competitors*name",*"",*$value*);*//*Remove*certain*text...
//$value*=*eregi_replace(*"<javascript[^>]*>",*"",*$value*);*//remove*javascripts
//$value*=*eregi_replace(*"<script[^>]*>",*"",*$value*);*//remove*scripts

//*replace*normal*links*with*HTML*to*open*fetched*links*in*new*window
$value*=*eregi_replace(*"href=",*"target=\"_blank\"*href=",*$value*);*

//*open*links*that*use*"*in*new*window*
$value*=*eregi_replace(*"href=\"",*"target=\"_blank\"*href=\"",*$value*);*

$donstart*=*"<table*class=\"tborder\"*width=\"175\"><tr><td*class=\"alt1\">";

$donend*=*"</td></tr></table>";

$FinalOutput*=*preg_replace("/(href=\"?)(\/[^\"\/]+)/",*"\\1"*.*$theDomain*.*"\\2",*$value);

echo*$donstart*;
echo*$FinalOutput*;*//prints*it*to*your*page
echo*$donend*;

flush*();*//force*output*to*your*page*faster

?>

_Aerospace_Eng_
02-16-2008, 08:10 PM
What is up with all of the '*'? Those are causing your problem. Everywhere you have those should be a space instead. I did a find and replace on your script. Try this

<?php

// Mini-Fetch - Remote Content Retrieval System

//In this case, it fetches a search for "fresh content" from www.alltheweb.com, whom we hope you will visit.
$theLocation="http://en.wikipedia.org/wiki/Php";
//Below, at $start and $finish, you'll enter the start and finish points in the remote HTML.

$startingpoint = "<link rel=\"copyright\" href=\"http://www.gnu.org/copyleft/fdl.html\" />"; // replace inside the quotes with with your unique start point in the source of the HTML page. It HAS to be unique.
$endingpoint = "<div id=\"footer\">"; // replace with the unique finish point in the source of the HTML page
//Don't forget to escape any " marks with a \ mark.
// Example: If the starting HTML is: <img src="images/something.jpg">
// You would tell Mini-Fetch: $startingpoint = "<img src=\"images/something.jpg\">";

//That's probably all you need to edit, unless you want to match and replace certain text or HTML.

// - "Don't touch this part..."
preg_match("/^(https?:\/\/)?([^\/] )(. )/i", "$theLocation", $matches);
$theDomain = "http://" . $matches[2];
$page = $matches[3];

$fd = fopen($theDomain.$page, "r"); // can change to "rb", on NT/2000 servers, if problems.
$value = "";
while(!feof($fd)){
$value .= fread($fd, 4096);
}
fclose($fd);
$start= strpos($value, "$startingpoint");
$finish= strpos($value, "$endingpoint");
$length= $finish-$start;
$value=substr($value, $start, $length);
// end "don't touch this part"


// eregi_replace, below, is a case-insensitive function to find, match, and replace variations of text that you define.
//The following commands strip or replace HTML tags.
//To NOT strip a certain HTML tag, add // before the line in question.
// the "", before the $value at the end of the line means replace the tag with blank space, which effectively deletes the tag.

// $value = eregi_replace( "<img src=[^>] >", "", $value ); // Remove all image tags. This is disabled until you remove the // in front of this line.
$value = eregi_replace( "<IMG alt=[^>] >", "", $value ); // Remove all image alt="whatever" tags
$value = eregi_replace( "<class[^>] >", "", $value ); // Remove all variations of <class> tags.
//$value = eregi_replace( "<table[^>] >", "", $value ); // Remove ALL variations of <table> tags.
//$value = eregi_replace( "<tr[^>] >", "", $value ); // Replace <tr> tags with blank space.
//$value = eregi_replace( "<td[^>] >", "", $value ); // Remove all variations of <td> tags.
$value = eregi_replace( "Signed up teams[^>] >", "", $value );



// Below - what's the difference, you ask, between eregi_replace and str_replace?
// str_replace is faster, by a long shot... The catch is that in can only be used
// to replace EXACT value matches, as you see below, and doesn't work well in huge files without using arrays.
$value = str_replace( "</font>", "", $value ); // Remove closing </font> tags.
//$value = str_replace( "</table>", "", $value ); // Remove closing </table> tags.
//$value = str_replace( "</tr>", "", $value ); // Remove closing </tr> tags.
//$value = str_replace( "</td>", "", $value ); // Remove closing </td> tags.
//$value = str_replace( "<center>", "", $value ); // Remove <center> tag...
//$value = str_replace( "</center>", "", $value ); // ...alignment calls.
$value = str_replace( "<b>", "", $value ); // Remove <b> tags.
$value = str_replace( "</b>", "", $value ); // Remove closing </b> tags...
//$value = str_replace( "<table style=\"width:100&#37;;padding:4px;border:1px solid #000;background:#7e661c;color:#fff;\">", "<table align=\"center\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"alt1\" width=\"100%\">", $value );
$value = str_replace( "<td>No</td>", "", $value );
$value = str_replace( "<td style=\"font:12px Arial,sans-serif;color:#fff;\"><b>PAID</b></td>", "", $value );
$value = str_replace( "<td>No</td>", "", $value );
$value = str_replace( "<a href=", "<a", $value );
$value = str_replace( "<table style=\"width:100%;padding:4px;border:1px solid #000;background:#7e661c;color:#fff;\">", "<table>", $value );
$value = str_replace( "</body>", "", $value );
$value = str_replace( "<td style=\"font:12px Arial,sans-serif;color:#fff;\">", "", $value );
$value = str_replace( "PAID", "", $value );
$value = str_replace( "<td colspan=\"3\" style=\"font:12px Arial,sans-serif;color:#fff;\"></td>", "", $value );
$value = str_replace( "</td>DIV</td>", "", $value );
$value = str_replace( "TEAM NAME</td>", "", $value );



// More tags. Just take out the // in front and edit as you like.
//$value = eregi_replace( "Competitors name", "", $value ); // Remove certain text...
//$value = eregi_replace( "<javascript[^>] >", "", $value ); //remove javascripts
//$value = eregi_replace( "<script[^>] >", "", $value ); //remove scripts

// replace normal links with HTML to open fetched links in new window
$value = eregi_replace( "href=", "target=\"_blank\" href=", $value );

// open links that use " in new window
$value = eregi_replace( "href=\"", "target=\"_blank\" href=\"", $value );

$donstart = "<table class=\"tborder\" width=\"175\"><tr><td class=\"alt1\">";

$donend = "</td></tr></table>";

$FinalOutput = preg_replace("/(href=\"?)(\/[^\"\/]+)/", "\\1" . $theDomain . "\\2", $value);

echo $donstart ;
echo $FinalOutput ; //prints it to your page
echo $donend ;

flush (); //force output to your page faster

?>

ojsimon
02-16-2008, 08:12 PM
It doest actually have these i don't know why it copied them like that

<?php

//&#160;Mini-Fetch&#160;-&#160;Remote&#160;Content&#160;Retrieval&#160;System

//In&#160;this&#160;case,&#160;it&#160;fetches&#160;a&#160;search&#160;for&#160;"fresh&#160;content"&#160;from&#160;www.alltheweb.com,&#160;whom&#160;we&#160;hope&#160;you&#160;will&#160;visit.
$theLocation="http://en.wikipedia.org/wiki/Php";
//Below,&#160;at&#160;$start&#160;and&#160;$finish,&#160;you'll&#160;enter&#160;the&#160;start&#160;and&#160;finish&#160;points&#160;in&#160;the&#160;remote&#160;HTML.

$startingpoint&#160;=&#160;"<link rel=\"copyright\" href=\"http://www.gnu.org/copyleft/fdl.html\" />";&#160;//&#160;replace&#160;inside&#160;the&#160;quotes&#160;with&#160;with&#160;your&#160;unique&#160;start&#160;point&#160;in&#160;the&#160;source&#160;of&#160;the&#160;HTML&#160;page.&#160;It&#160;HAS&#160; to&#160;be&#160;unique.
$endingpoint&#160;=&#160;"<div id=\"footer\">";&#160;//&#160;replace&#160;with&#160;the&#160;unique&#160;finish&#160;point&#160;in&#160;the&#160;source&#160;of&#160;the&#160;HTML&#160;page&#160;
//Don't&#160;forget&#160;to&#160;escape&#160;any&#160;"&#160;marks&#160;with&#160;a&#160;\&#160;mark.
//&#160;Example:&#160;If&#160;the&#160;starting&#160;HTML&#160;is:&#160;<img&#160;src="images/something.jpg">
//&#160;You&#160;would&#160;tell&#160;Mini-Fetch:&#160;$startingpoint&#160;=&#160;"<img&#160;src=\"images/something.jpg\">";

//That's&#160;probably&#160;all&#160;you&#160;need&#160;to&#160;edit,&#160;unless&#160;you&#160;want&#160;to&#160;match&#160;and&#160;replace&#160;certain&#160;text&#160;or&#160;HTML.

//&#160;-&#160;"Don't&#160;touch&#160;this&#160;part..."
preg_match("/^(https?:\/\/)?([^\/]*)(.*)/i",&#160;"$theLocation",&#160;$matches);
$theDomain&#160;=&#160;"http://"&#160;.&#160;$matches[2];
$page&#160;=&#160;$matches[3];

$fd&#160;=&#160;fopen($theDomain.$page,&#160;"r");&#160;//&#160;can&#160;change&#160;to&#160;"rb",&#160;on&#160;NT/2000&#160;servers,&#160;if&#160;problems.
$value&#160;=&#160;"";
while(!feof($fd)){
$value&#160;.=&#160;fread($fd,&#160;4096);&#160;
}
fclose($fd);
$start=&#160;strpos($value,&#160;"$startingpoint");&#160;
$finish=&#160;strpos($value,&#160;"$endingpoint");&#160;
$length=&#160;$finish-$start;
$value=substr($value,&#160;$start,&#160;$length);
//&#160;end&#160;"don't&#160;touch&#160;this&#160;part"


//&#160;eregi_replace,&#160;below,&#160;is&#160;a&#160;case-insensitive&#160;function&#160;to&#160;find,&#160;match,&#160;and&#160;replace&#160;variations&#160;of&#160;text&#160;that&#160;you&#160;define.
//The&#160;following&#160;commands&#160;strip&#160;or&#160;replace&#160;HTML&#160;tags.&#160;
//To&#160;NOT&#160;strip&#160;a&#160;certain&#160;HTML&#160;tag,&#160;add&#160;//&#160;before&#160;the&#160;line&#160;in&#160;question.
//&#160;the&#160;"",&#160;before&#160;the&#160;$value&#160;at&#160;the&#160;end&#160;of&#160;the&#160;line&#160;means&#160;replace&#160;the&#160;tag&#160;with&#160;blank&#160;space,&#160;which&#160;effectively &#160;deletes&#160;the&#160;tag.

//&#160;$value&#160;=&#160;eregi_replace(&#160;"<img&#160;src=[^>]*>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;all&#160;image&#160;tags.&#160;This&#160;is&#160;disabled&#160;until&#160;you&#160;remove&#160;the&#160;//&#160;in&#160;front&#160;of&#160;this&#160;line.
$value&#160;=&#160;eregi_replace(&#160;"<IMG&#160;alt=[^>]*>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;all&#160;image&#160;alt="whatever"&#160;tags
$value&#160;=&#160;eregi_replace(&#160;"<class[^>]*>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;all&#160;variations&#160;of&#160;<class>&#160;tags.
//$value&#160;=&#160;eregi_replace(&#160;"<table[^>]*>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;ALL&#160;variations&#160;of&#160;<table>&#160;tags.
//$value&#160;=&#160;eregi_replace(&#160;"<tr[^>]*>",&#160;"",&#160;$value&#160;);&#160;//&#160;Replace&#160;<tr>&#160;tags&#160;with&#160;blank&#160;space.
//$value&#160;=&#160;eregi_replace(&#160;"<td[^>]*>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;all&#160;variations&#160;of&#160;<td>&#160;tags.
$value&#160;=&#160;eregi_replace(&#160;"Signed&#160;up&#160;teams[^>]*>",&#160;"",&#160;$value&#160;);



//&#160;Below&#160;-&#160;what's&#160;the&#160;difference,&#160;you&#160;ask,&#160;between&#160;eregi_replace&#160;and&#160;str_replace?
//&#160;str_replace&#160;is&#160;faster,&#160;by&#160;a&#160;long&#160;shot...&#160;The&#160;catch&#160;is&#160;that&#160;in&#160;can&#160;only&#160;be&#160;used
//&#160;to&#160;replace&#160;EXACT&#160;value&#160;matches,&#160;as&#160;you&#160;see&#160;below,&#160;and&#160;doesn't&#160;work&#160;well&#160;in&#160;huge&#160;files&#160;without&#160;using &#160;arrays.
$value&#160;=&#160;str_replace(&#160;"</font>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;closing&#160;</font>&#160;tags.
//$value&#160;=&#160;str_replace(&#160;"</table>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;closing&#160;</table>&#160;tags.
//$value&#160;=&#160;str_replace(&#160;"</tr>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;closing&#160;</tr>&#160;tags.
//$value&#160;=&#160;str_replace(&#160;"</td>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;closing&#160;</td>&#160;tags.
//$value&#160;=&#160;str_replace(&#160;"<center>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;<center>&#160;tag...
//$value&#160;=&#160;str_replace(&#160;"</center>",&#160;"",&#160;$value&#160;);&#160;//&#160;...alignment&#160;calls.
$value&#160;=&#160;str_replace(&#160;"<b>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;<b>&#160;tags.
$value&#160;=&#160;str_replace(&#160;"</b>",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;closing&#160;</b>&#160;tags...
//$value&#160;=&#160;str_replace(&#160;"<table&#160;style=\"width:100&#37;;padding:4px;border:1px&#160;solid&#160;#000;background:#7e661c;color:#fff;\">",&#160;"<table&#160;align=\"center\"&#160;border=\"0\"&#160;cellpadding=\"4\"&#160;cellspacing=\"1\"&#160;class=\"alt1\"&#160;width=\"100%\">",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<td>No</td>",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<td&#160;style=\"font:12px&#160;Arial,sans-serif;color:#fff;\"><b>PAID</b></td>",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<td>No</td>",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<a&#160;href=",&#160;"<a",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<table&#160;style=\"width:100%;padding:4px;border:1px&#160;solid&#160;#000;background:#7e661c;color:#fff;\">",&#160;"<table>",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"</body>",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<td&#160;style=\"font:12px&#160;Arial,sans-serif;color:#fff;\">",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"PAID",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"<td&#160;colspan=\"3\"&#160;style=\"font:12px&#160;Arial,sans-serif;color:#fff;\"></td>",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"</td>DIV</td>",&#160;"",&#160;$value&#160;);
$value&#160;=&#160;str_replace(&#160;"TEAM&#160;NAME</td>",&#160;"",&#160;$value&#160;);&#160;



//&#160;More&#160;tags.&#160;Just&#160;take&#160;out&#160;the&#160;//&#160;in&#160;front&#160;and&#160;edit&#160;as&#160;you&#160;like.
//$value&#160;=&#160;eregi_replace(&#160;"Competitors&#160;name",&#160;"",&#160;$value&#160;);&#160;//&#160;Remove&#160;certain&#160;text...
//$value&#160;=&#160;eregi_replace(&#160;"<javascript[^>]*>",&#160;"",&#160;$value&#160;);&#160;//remove&#160;javascripts
//$value&#160;=&#160;eregi_replace(&#160;"<script[^>]*>",&#160;"",&#160;$value&#160;);&#160;//remove&#160;scripts

//&#160;replace&#160;normal&#160;links&#160;with&#160;HTML&#160;to&#160;open&#160;fetched&#160;links&#160;in&#160;new&#160;window
$value&#160;=&#160;eregi_replace(&#160;"href=",&#160;"target=\"_blank\"&#160;href=",&#160;$value&#160;);&#160;

//&#160;open&#160;links&#160;that&#160;use&#160;"&#160;in&#160;new&#160;window&#160;
$value&#160;=&#160;eregi_replace(&#160;"href=\"",&#160;"target=\"_blank\"&#160;href=\"",&#160;$value&#160;);&#160;

$donstart&#160;=&#160;"<table&#160;class=\"tborder\"&#160;width=\"175\"><tr><td&#160;class=\"alt1\">";

$donend&#160;=&#160;"</td></tr></table>";

$FinalOutput&#160;=&#160;preg_replace("/(href=\"?)(\/[^\"\/]+)/",&#160;"\\1"&#160;.&#160;$theDomain&#160;.&#160;"\\2",&#160;$value);

echo&#160;$donstart&#160;;
echo&#160;$FinalOutput&#160;;&#160;//prints&#160;it&#160;to&#160;your&#160;page
echo&#160;$donend&#160;;

flush&#160;();&#160;//force&#160;output&#160;to&#160;your&#160;page&#160;faster

?>

_Aerospace_Eng_
02-16-2008, 08:15 PM
I just tested this and it seems to work fine.

ojsimon
02-17-2008, 12:49 AM
what did it return? thats strange ive tried it on my local php server and my hosting server, neither worked.

thanks

Inigoesdr
02-17-2008, 07:25 AM
It works for me.. it returned the page:

PHP
From Wikipedia, the free encyclopedia
(Redirected from Php)
Jump to: navigation, search
For other uses, see PHP (disambiguation).
PHP
Paradigm imperative, object-oriented
Appeared in 1995
Designed by Rasmus Lerdorf
Developer The PHP Group
Latest release 5.2.5/ 8 November 2007
Typing discipline Dynamic, weak
Influenced by C, Perl, Java, C++, C#, Python
OS Cross-platform
License PHP License
Website http://php.net/

PHP is a computer scripting language originally designed for producing dynamic web pages.[1] The name PHP is a recursive acronym for PHP: Hypertext Preprocessor.

PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

The main implementation is produced by The PHP Group and released under the PHP License. This implementation serves to define a de facto standard for PHP, as there is no formal specification. The most recent version of PHP is 5.2.5, released on 8 November 2007. It is considered to be free software by the Free Software Foundation.[2]

Contents
1 History
2 Usage
2.1 Server-side scripting
2.2 Command-line scripting
2.3 Client-side GUI applications
3 Syntax
3.1 Data types
3.2 Functions
3.3 Objects
4 Resources
4.1 Libraries
4.2 Extensions
4.3 Source code encoders, optimizers and accelerators
4.4 Debuggers and profilers
4.5 Templating engines
4.6 PEAR
5 Support
6 Criticism
7 Release history of major versions
8 Future development
9 Implementations
10 See also
11 References
12 Further reading
13 External links



[edit] History

Rasmus Lerdorf, original creator of the PHP programming language
PHP was written as a set of Common Gateway Interface (CGI) binaries in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf in 1994, to replace a small set of Perl scripts he had been using to maintain his personal homepage.[3] Lerdorf initially created PHP to display his résumé and to collect certain data, such as how much traffic his page was receiving. Personal Home Page Tools was publicly released on 8 June 1995 after Lerdorf combined it with his own Form Interpreter to create PHP/FI (this release is considered PHP version 2).[4]

Zeev Suraski and Andi Gutmans, two Israeli developers at the Technion IIT, rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive initialism PHP: Hypertext Preprocessor. The development team officially released PHP/FI 2 in November 1997 after months of beta testing. Public testing of PHP 3 began and the official launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999.[5] They also founded Zend Technologies in Ramat Gan, Israel, which actively manages the development of PHP.

In May 2000, PHP 4, powered by the Zend Engine 1.0, was released. The most recent update released by The PHP Group, is for the older PHP version 4 code branch which, as of January 2008, is up to version 4.4.8. PHP 4 will be supported by security updates until August 8, 2008.[6]

On July 13, 2004, PHP 5 was released powered by the new Zend Engine II. PHP 5 included new features such as:[7]

Improved support for object-oriented programming
The PHP Data Objects extension, which defines a lightweight and consistent interface for accessing databases
Performance enhancements
Better support for MySQL and MSSQL
Embedded support for SQLite
Integrated SOAP support
Data iterators
Error handling via exceptions
Currently, PHP 5.x is the only stable version that is being actively developed; active development on PHP 4 ceased at the end of 2007. However, critical security updates for PHP 4 will be provided until August 8, 2008.[8] PHP 6 is currently under development, and is slated to release in conjunction with the decommission of PHP 4.[citation needed] As a result of the GoPHP5 initiative, many high profile open source projects ceased to support PHP 4 in new code as of 5 February 2008.[9]
<snip>

ojsimon
02-17-2008, 11:16 AM
Thanks for telling me this. I'm just trying to work out why its not working on either of my servers, what version of php and what add ons do you have? also what operating systems is your server? this would really help me

Thanks
Olie

Inigoesdr
02-17-2008, 01:26 PM
I'm using PHP v5.2.5. OS shouldn't really matter, but it's Windows. The error you posted usually means you're missing a quote somewhere. Since it works for both Aero and myself I'm guessing you're using a different code than the one posted here (http://www.codingforums.com/showpost.php?p=656705&postcount=2), or you aren't showing all of the code.

ojsimon
02-17-2008, 02:28 PM
Hi
Thanks for all your help i have now got it to work, it just required me to convert it to ASCII, thanks again for all your help.

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum