Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 May, 2013, 06:13:31 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: PHP opendir() of an external page -  (Read 482 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Sorunome
Muffins
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 04:57:13
Date Registered: 26 September, 2011, 17:46:38
Location: Ponyville
Posts: 2912


Topic starter
Total Post Ratings: +161

View Profile WWW
« on: 31 March, 2012, 11:07:15 »
0

Hey, I wanted to know if, and if how, it is possible to opendir() of an external page, e.g. http://www.google.com
Logged

http://z0r.de/4017
http://www.youtube.com/watch?v=BFOoazEx9lU
http://www.sorunome.de
http://reubenquest.net
+++++++[>++++++++++++<-]>.<+++[>----<-]>.---.<++++[>>++++++++<<-]>>.<++.------.++++++++++++.--------.

++++++[>++++++++++<-]>++++++++.<+++[>+++++++++++<-]>.+++++++++++++.--.<+++[>+++<-]>.<+++[>>++++++++++<<-]>>++.<<+++++++[>-------<-]>.<+++[>+++++++++++++<-]>..+++++++.<+++[>-----<-]>--.<++[>++++++<-]>++.

If OmnomIRC is screwed up, blame me Tongue

Save Derpy!(http://www.youtube.com/watch?v=cg-_HeVNYOk)
Spoiler for spoilers:


Spoiler for languages:
- TI-BASIC
 - TI-Highbrid Basic
 - Grammer
 - Axe
 - HTML
 - JavaScript
 - CSS
 - PHP
 - C++
 - lua
 - Python
 - MYSQL
 - Brainf*ck
 - English
 - German
Spoiler for internet:
/image/36691.png[/img]
Gimme internet NOW
Spoiler for me:
Spoiler for my little game:
my little game...my little game..aaaaaahhhhhh...my little game, i used to wonder how to lose the game, my little game, until you shared its losing with me. take the losing and the game, a beutiful game so losable, sharing losing is a easy sweat and losing makes it aweful neat to have my little game togeather with my very best games.
Spoiler for stuff:
Spoiler for derpy:



cooliojazz
Support Staff
LV7 Elite (Next: 700)
*
Offline Offline

Gender: Male
Last Login: Today at 00:23:49
Date Registered: 23 May, 2009, 19:28:11
Location: Colorado, USA
Posts: 614


Total Post Ratings: +52

View Profile WWW
« Reply #1 on: 31 March, 2012, 14:45:52 »
0

No, it is not.
Logged

Spoiler for Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."



TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here
The Rest Should Be Here (Bandcamp)
Netham45
WOOOOOO
President
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 23:05:26
Date Registered: 26 August, 2008, 07:35:31
Location: Denver, Colorado
Posts: 2296


Total Post Ratings: +208

View Profile WWW
« Reply #2 on: 31 March, 2012, 17:30:53 »
0

You could use file_get_contents() to get the html of google, but you couldn't use opendir on it. Opendir only works on a locally-mounted filesystem.
Logged

Creator of OmnomIRC and SpyBot45
Join LOPN(Lobsters Opposing Pink Names) now, help us fight back!
Message me for more information, and to join now!
Members: Graphmastur;Stefan Bauwens
HOLY SHIT, I HAVE A BLOG



                                     
Put this in your signature if you've played the original WFRNG
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:39:24
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #3 on: 31 March, 2012, 17:32:35 »
0

Nope. In fact, your PHP script can't tell at all if something on another server is a directory at all, any more than you (as a user) can (for example, is http://example.com/page1 a directory or a file?).

All you can know is the content that server returns to you. In some places, a site might return a plain-text listing of the directory's contents (such as http://eeems.omnimaga.org/files/), while in other places it might return 403 Forbidden, in order not to show you what's inside. And if there's a file called index.html or default.html or anything like that, of course, that's exactly what the server will show you when you try to open that directory.
« Last Edit: 31 March, 2012, 17:40:33 by Deep Thought » Logged




Sorunome
Muffins
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 04:57:13
Date Registered: 26 September, 2011, 17:46:38
Location: Ponyville
Posts: 2912


Topic starter
Total Post Ratings: +161

View Profile WWW
« Reply #4 on: 31 March, 2012, 22:34:41 »
0

Ah, ok, thanks for your help, it seems all-logical Smiley
Logged

http://z0r.de/4017
http://www.youtube.com/watch?v=BFOoazEx9lU
http://www.sorunome.de
http://reubenquest.net
+++++++[>++++++++++++<-]>.<+++[>----<-]>.---.<++++[>>++++++++<<-]>>.<++.------.++++++++++++.--------.

++++++[>++++++++++<-]>++++++++.<+++[>+++++++++++<-]>.+++++++++++++.--.<+++[>+++<-]>.<+++[>>++++++++++<<-]>>++.<<+++++++[>-------<-]>.<+++[>+++++++++++++<-]>..+++++++.<+++[>-----<-]>--.<++[>++++++<-]>++.

If OmnomIRC is screwed up, blame me Tongue

Save Derpy!(http://www.youtube.com/watch?v=cg-_HeVNYOk)
Spoiler for spoilers:


Spoiler for languages:
- TI-BASIC
 - TI-Highbrid Basic
 - Grammer
 - Axe
 - HTML
 - JavaScript
 - CSS
 - PHP
 - C++
 - lua
 - Python
 - MYSQL
 - Brainf*ck
 - English
 - German
Spoiler for internet:
/image/36691.png[/img]
Gimme internet NOW
Spoiler for me:
Spoiler for my little game:
my little game...my little game..aaaaaahhhhhh...my little game, i used to wonder how to lose the game, my little game, until you shared its losing with me. take the losing and the game, a beutiful game so losable, sharing losing is a easy sweat and losing makes it aweful neat to have my little game togeather with my very best games.
Spoiler for stuff:
Spoiler for derpy:



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.209 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.