Forum Moderators: coopster
If possible give some examples
[edited by: eK3eKyToPa at 11:30 am (utc) on July 11, 2008]
[edited by: coopster at 12:28 pm (utc) on July 11, 2008]
[edit reason] generalized domain and keywords [/edit]
if ( $e1 !="_" && $e1 != "") {
$data=file_get_contents("http://www.localhost.com/?search=PAGE",FALSE,NULL,0,7000);
list($nachalensors, $displayIdplus) = explode("displayId:", $data);
list($displayId, $slotplus) = explode(", slot: ", $displayIdplus);
list($slot, $krai) = explode('})">', $slotplus);
echo $slot . ", " . $displayId . ", ";
}
And this works, but maybe will be slow
AND I cant set the source site as a variable
this dont works:
$e1 = "PAGE";
$search = "http://www.localhost.com/?search=" . $e1;
$data=file_get_contents( $search ,FALSE,NULL,0,7000);
HOW to do it ?
[edited by: eK3eKyToPa at 5:50 pm (utc) on July 11, 2008]
As for your code not working with the variable 'search' terms, there is only one problem that I see, which, given the example you have shown above, isn't a problem for that specific case. The only thing you should do it urlencode the search string like this:
$search = 'http://www.example.com/?search=' . [url=http://www.php.net/urlencode]urlencode[/url]($e1);
other than that it looks fine. Check for any errors in your error log to see if anything comes up? It should be working, however.