
![]() |
nutballs
err, i just noticed something with perks webrequest class that made my head hurt...
The class is named webrequest2 the first function within that class is also name webrequest2 um, what? when does that function ever get called? is it another method of intializing the class, like __construct? vsloathe
Correct me if I'm wrong, but doesn't a function with the same name as the class constitute a constructor func, and as such wouldn't it be called every time the class is instantiated?
perkiset
That's a
PHP4 legacy piece.in PHP5 is where they introduced __construct() and the other magic functions. InPHP4, the constructor HAD to be named the name of the class, just likeJavaScript. That class is due for aPHP5ing, but until then it's still good to go inPHP4.vsloathe
lol
We posted @ the same time, Perk. perkiset
great minds and all
![]() nutballs
ok, its what I figured, just wanted to confirm.
I am trying to strip down the webrequest class to the simplest little "get a URL" function possible. Basically, file_get_contents, without using that function and keeping it in sockets. |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads