You'd think so, wouldn't you? I got bitten by this one.No... for security, pages on other servers are executed as plain text, passed directly to the output buffer. No?
You'd think so, wouldn't you? I got bitten by this one.No... for security, pages on other servers are executed as plain text, passed directly to the output buffer. No?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
The URL in the echo statement is the page you are looking for the table.
It will get the html from that page and search it for the table.
Twey, that's really stupid. Perhaps this is the root of your dislike for the language?![]()
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
You can't include remote files with PHP5. It's disabled by default.You'd think so, wouldn't you? I got bitten by this one.
I've even tried it with the GoDaddy servers...
Unless you're hosted with erm... STUPID PEOPLE?
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
But you should be able to. It simply shouldn't be a security risk. Perhaps they'll fix with PHP6....
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Code:Warning: include() [function.include]: URL file-access is disabled in the server configuration in G:\apache\htdocs\home\peter\public_html\remoteinclusion.php on line 1 Warning: include(http://thebrbforums.com/) [function.include]: failed to open stream: no suitable wrapper could be found in G:\apache\htdocs\home\peter\public_html\remoteinclusion.php on line 1 Warning: include() [function.include]: Failed opening 'http://thebrbforums.com/' for inclusion (include_path='.;C:\php5\pear') in G:\apache\htdocs\home\peter\public_html\remoteinclusion.php on line 1
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
veiled I have to test script php but when I open the page with my exploring it posts me only that
'.$b.'')); $fn = strpos($f,'',strpos($f,''.$b.'')))-strpos($f,''.$b.'')); return substr($f,strpos($f,'
In order to use PHP code on the page, you must place it within <?php ..... ?> tags, have PHP installed/enabled on your server, and the page must end with the .php extension, not .htm.
I'm guessing that the last thing is the problem. Rename your page [yourname].php
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
No, not really. It certainly doesn't curry it any favour, but the root of my dislike for the language is its inane inflexibility -- like passing "functions" by passing their name as a string, and defining all functions superglobally to make this possible.Perhaps this is the root of your dislike for the language?That means you have url_fopen disabled entirely, not just for includes. This will prevent you doing fopen() or get_file_contents() on remote resources as well. It's about 50:50 whether a given server will have this enabled or not, in my experience.Warning: include() [function.include]: URL file-access is disabled in the server configuration in G:\apache\htdocs\home\peter\public_html\remoteinclusion.php on line 1The PHP isn't being parsed.veiled I have to test script php but when I open the page with my exploring it posts me only that
'.$b.'')); $fn = strpos($f,'',strpos($f,''.$b.'')))-strpos($f,''.$b.'')); return substr($f,strpos($f,'
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
my waiter accepts the php well. The name of the file is correct (test.php).
do you have an idea on the failure of this script at home?
I have to test on several waiters and it always posts an error
http://membres.lycos.fr/powersat2/
http://powersat.alwaysdata.net
even with the various waiters, script does not post what it would owe
Last edited by byronghislain; 08-18-2007 at 09:24 PM.
Here's the code, fixed a bit:
PHP Code:<?php
function get_table($page,$b) {
$f = file_get_contents($page);
$st = strpos($f,'<table',strpos($f,'<b>'.$b.'</b>'));
$fn = strpos($f,'</table>',$st)-$st;
return substr($f,$st,$fn);
}
echo get_table('http://the.com/page.htm','D+');
?>
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks