I think you must know where the physical path of the file that not have the argument.... First : You must open the page by your browser to know the physical path. After the page have been opened ,please click right click on ur mouse... And chose properties (if you use IE browser)...u will see the physical URL that have no arguments.. this adddess that u have assign to $filename='http://..........." ----- Original Message ----- From: "Salim Ahmed" <salimkamboh@xxxxxxxxx> To: <php-objects@xxxxxxxxxxxxxxx> Sent: Tuesday, June 14, 2005 14:18 Subject: Opening remote fie > Hi all! > I want to open/execute a remote php file and get its result in a variable and > then to parse it. I use fopen and fread. My problem is that $filename doesn't > accept arguments. Code is as under: > <? > $filename = "http://a_remote_host.com/my_file.php?arg1=value1&arg2=value2"; > fopen($filename, "r"); > $contents = fread($handle, filesize($filename)); > ?> > It shows the followings: > Warning: fopen(): php_network_getaddresses: gethostbyname failed in > c:\apache\htdocs\search\action.php on line 3 > > Warning: fopen(http://a_remote_host.com/my_file.php?arg1=value1&arg2=value2): > failed to open stream: Invalid argument in c:\apache\htdocs\search\action.php > on line 3 > > Warning: filesize(): Stat failed for > http://a_remote_host.com/my_file.php?arg1=value1&arg2=value2 (errno=2 - No such > file or directory) in c:\apache\htdocs\search\action.php on line 4 > > Warning: fread(): supplied argument is not a valid stream resource in > c:\apache\htdocs\search\action.php on line 4 > > > Can any one help me in this regard? > Saleem > > > > __________________________________ > Discover Yahoo! > Use Yahoo! to plan a weekend, have fun online and more. Check it out! > http://discover.yahoo.com/ > > > > > PHP Data object relational mapping generator - http://www.meta-language.net/ > Yahoo! Groups Links > > > > > > > PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/