Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-03-2003, 08:43 AM   #1
JamesK
hi
 
Industry Role:
Join Date: Jun 2002
Posts: 16,731
php changed my life

<?php

$noheader=1;

//require("./global.php");

set_magic_quotes_runtime(0);

error_reporting(7);

// ###################### Start init #######################

unset($dbservertype);
unset($debug);

//load config
require('./admin/config.php');
if ($debug != 1) {
unset($showqueries);
unset($explain);
}

// init db **********************
// load db class
$dbservertype = strtolower($dbservertype);
$dbclassname="./admin/db_$dbservertype.php";
require($dbclassname);

$DB_site=new DB_Sql_vb;

$DB_site->appname='vBulletin';
$DB_site->appshortname='vBulletin (forum)';
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;

$DB_site->connect();

$dbpassword="";
$DB_site->password="";
// end init db

if (!empty($userid)) {
$userid = intval($userid);
} else if (!empty($HTTP_POST_VARS['userid'])) {
$userid = intval($HTTP_POST_VARS['userid']);
} else if (!empty($HTTP_GET_VARS['userid'])) {
$userid = intval($HTTP_GET_VARS['userid']);
} else {
$userid = 0;
}

if ($avatarinfo=$DB_site->query_first("SELECT avatardata,dateline,f
__________________
M3Server - NATS Hosting
JamesK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 08:45 AM   #2
Poo-Chee
So Fucking Banned
 
Join Date: Sep 2003
Location: Rotterdam
Posts: 3,560
very compact life...
Poo-Chee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 08:51 AM   #3
Fonz
Confirmed User
 
Fonz's Avatar
 
Industry Role:
Join Date: Aug 2003
Location: Hellgium
Posts: 486
don't see how you can order a beer at the bar with that
__________________
hardlinks for sale - ICQ 24298240 - links*at*smilinpussy.com
Fonz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 08:52 AM   #4
SMG
Confirmed User
 
Join Date: Aug 2003
Posts: 1,798
O_o
__________________
TGP Webmasters: sign up for the top 100 tgp list!
Submit galleries
If you add me to icq (title) make sure to mention GFY or I'll think you're a bot and deny you.
SMG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 08:57 AM   #5
JamesK
hi
 
Industry Role:
Join Date: Jun 2002
Posts: 16,731
Quote:
Originally posted by SMG
O_o
well said
__________________
M3Server - NATS Hosting
JamesK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 08:59 AM   #6
DarkJedi
No Refunds Issued.
 
DarkJedi's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: GFY
Posts: 28,301
OMG !!

what is that btw ?
DarkJedi is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 09:05 AM   #7
Poo-Chee
So Fucking Banned
 
Join Date: Sep 2003
Location: Rotterdam
Posts: 3,560
Quote:
Originally posted by DarkJedi
OMG !!

what is that btw ?
php
Poo-Chee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 09:28 AM   #8
who
So Fucking Banned
 
Join Date: Aug 2003
Location: ICQ #23642053
Posts: 19,593
Quote:
Originally posted by Poo-Chee


php
WOW! That's space age shit!!!!!!!!!!!!!!
who is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:07 AM   #9
TheFLY
So Fucking Banned
 
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
I've coded some PHP and I have no idea WTF that does... add some comments... :p
TheFLY is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:14 AM   #10
DarkJedi
No Refunds Issued.
 
DarkJedi's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: GFY
Posts: 28,301
yes, what does it do ?
DarkJedi is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:16 AM   #11
badmrfrosty
Confirmed User
 
Join Date: May 2003
Posts: 500
maybe the reason you dont know what it does is because it doesnt do anything

if ($avatarinfo=$DB_site->query_first("SELECT avatardata,dateline,f
because it isnt finished...

BMF
badmrfrosty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:19 AM   #12
Nightwork
Registered User
 
Join Date: Oct 2003
Posts: 61
what's the most "practical" programming language to know for the web?

When I was talking about bad programming in the topic above, I referred to trash like this, hehe
__________________
God may have created the world in 6 days, but you can bet your ass that while he rested on the 7th, a programmer coded it all.<br>ICQ:48322442
Nightwork is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:20 AM   #13
JamesK
hi
 
Industry Role:
Join Date: Jun 2002
Posts: 16,731
Quote:
Originally posted by Nightwork
what's the most "practical" programming language to know for the web?

When I was talking about bad programming in the topic above, I referred to trash like this, hehe
how the fuck can you call it trash? I took it from VBulletin, one of the best community scripts ever.
__________________
M3Server - NATS Hosting
JamesK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:31 AM   #14
badmrfrosty
Confirmed User
 
Join Date: May 2003
Posts: 500
vbulletin is the most insecure xss prone script next to phpnuke ;-)

yeah its reaaaaaal good, 80% of good hosting compaines will not run vbulletin or phpnuke on their servers because it is nefarious for being shit.

BMF
badmrfrosty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:31 AM   #15
TheViper
Confirmed User
 
Join Date: Mar 2003
Location: the streets.
Posts: 2,560
Quote:
Originally posted by Wildcard


how the fuck can you call it trash? I took it from VBulletin, one of the best community scripts ever.
TRASH
TheViper is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:39 AM   #16
Nightwork
Registered User
 
Join Date: Oct 2003
Posts: 61
Quote:
how the fuck can you call it trash? I took it from VBulletin, one of the best community scripts ever.
Ok than...
First off, it's uncommented. Scripts without proper comments suck by default.

The structure is trash. You put includes/requires on top not in the middle of your source. It's all about structure

The dbase class (and I even haven't seen it completly)is crap.

stuff like:
$dbservertype = strtolower($dbservertype);
$dbclassname="./admin/db_$dbservertype.php";

Are solutions you use when you start programming one month.
See adodb for how a good dbasewrappingclass looks like.

$DB_site->appname='vBulletin';
$DB_site->appshortname='vBulletin (forum)';
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;

If you like to type a lot and do things double, go ahead. But this should be one line of code max).

if ($debug != 1) {
unset($showqueries);
unset($explain);
}

If you use debugging functionallity, write a global debugging function and put it in yr global/config file. And trigger it on seperate ages by simply adjusting a $debug to True or false;

Since PHP 4.0.x or something, global_vars are set off by default (for a very, very good security reason)

if (!empty($userid)) {
$userid = intval($userid);
} else if (!empty($HTTP_POST_VARS['userid'])) {
$userid = intval($HTTP_POST_VARS['userid']);
} else if (!empty($HTTP_GET_VARS['userid'])) {
$userid = intval($HTTP_GET_VARS['userid']);
} else {
$userid = 0;
}

ifelse loops like above are written by people who apparently have trouble understandig security issues and haven't made up their mind about what they're writing and what it should do in the first place.
Besides, you pass values like $userid through sessions not through forms.

So that's how the f*ck I call it trash

And yeah, I'm just bored, hehe
__________________
God may have created the world in 6 days, but you can bet your ass that while he rested on the 7th, a programmer coded it all.<br>ICQ:48322442
Nightwork is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:47 AM   #17
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,571
WHILE ($answers < $solutions) {
echo "Not done yet";
$learn++;
}
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 10:54 AM   #18
sweet7
Confirmed User
 
Join Date: May 2003
Posts: 1,792
Quote:
Originally posted by TheFLY
I've coded some PHP and I have no idea WTF that does... add some comments... :p
connects to some db's but the code gets cut off so who knows what happens during and after the query.

Looks like it might be a login script.
Needs comments.
__________________
ICQ: 282814268
sweet7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 12:40 PM   #19
KCat
Confirmed User
 
Join Date: Sep 2002
Location: PNW
Posts: 2,204
Quote:
Originally posted by fris
WHILE ($answers < $solutions) {
echo "Not done yet";
$learn++;
}
KCat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-03-2003, 12:45 PM   #20
TDF
Triple OG nigga on GFY
 
TDF's Avatar
 
Industry Role:
Join Date: Mar 2002
Location: in the BP4L family compound
Posts: 27,296
geekie tech 101
__________________
Sig heil

TDF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.