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 08-21-2006, 10:28 PM   #1
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Your PHP questions answered

To celebrate my 2nd post (whoooo wooo!) I'll be answering any PHP question you have for the next hour.
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:30 PM   #2
NiggaRiche
Confirmed User
 
Join Date: Aug 2006
Posts: 107
write me a big cms management script.

i mean

can you write me a big cms management script?
NiggaRiche is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:35 PM   #3
CaptainHowdy
Too lazy to set a custom title
 
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 93,575
Why the hell PHP stands for "Personal Home Page"??
CaptainHowdy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:36 PM   #4
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Quote:
Originally Posted by CaptainHowdy
Why the hell PHP stands for "Personal Home Page"??
I doesn't. It stands for PHP Hypertext Processor.

Next.
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:37 PM   #5
2HousePlague
CURATOR
 
Join Date: Jul 2004
Location: the attic
Posts: 14,572





2hp
__________________
tada!
2HousePlague is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:44 PM   #6
donross
Confirmed User
 
Join Date: Aug 2005
Posts: 1,295
what do you need to build PHP SMS script??
__________________
Email: [email protected] | Skype: ross.alcazar
donross is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:46 PM   #7
xxxice
Confirmed User
 
Join Date: Feb 2002
Posts: 5,042
can php make it so the text that is printed on a page can all be a certain length: like 20 characters or something? what is the code?
xxxice is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:55 PM   #8
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Sure.

To find out the length of a string use the strlen() function.

To pad on extra characters or remove some use substr

Info about each of these at php.net. You can also treat a string like an array of characters using []. ie. $string[23] = "d";

Quote:
Originally Posted by vanderweb
can php make it so the text that is printed on a page can all be a certain length: like 20 characters or something? what is the code?
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:57 PM   #9
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Search Google for php esendex

Quote:
Originally Posted by donross
what do you need to build PHP SMS script??
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 10:58 PM   #10
mfps
Confirmed User
 
Join Date: Mar 2006
Location: southern california
Posts: 640
Quote:
Originally Posted by sevent
You can also treat a string like an array of characters using []. ie. $string[23] = "d";
i did not know that.

nice tip
__________________
mfps is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:00 PM   #11
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Quote:
Originally Posted by mfps
i did not know that.

nice tip
Yup. Just another reason why PHP kick way more ass than that overhyped new mother fucking Samual L Jackson film.
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:02 PM   #12
mfps
Confirmed User
 
Join Date: Mar 2006
Location: southern california
Posts: 640
Quote:
Originally Posted by sevent
Yup. Just another reason why PHP kick way more ass than that overhyped new mother fucking Samual L Jackson film.
__________________
mfps is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:21 PM   #13
r-c-e
Confirmed User
 
Join Date: Jul 2002
Posts: 1,070
How does Ruby on Rails compare wth PHP?
r-c-e is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:27 PM   #14
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Quote:
Originally Posted by r-c-e
How does Ruby on Rails compare wth PHP?
Ruby on rails is the programming language Ruby plus the framework "rails". Ruby is one of the more recent programming languages of the moment with no where near the support or base of available scripts as PHP.
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:28 PM   #15
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Any more questions? Final call. Anyone...? Anyone...?
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:29 PM   #16
xxxice
Confirmed User
 
Join Date: Feb 2002
Posts: 5,042
Quote:
Originally Posted by sevent
Sure.

To find out the length of a string use the strlen() function.

To pad on extra characters or remove some use substr

Info about each of these at php.net. You can also treat a string like an array of characters using []. ie. $string[23] = "d";
thank u

what do the 23 and the d stand for in this example? do i put this on any line of the code or does it need it's own line
xxxice is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2006, 11:34 PM   #17
sevent
Confirmed User
 
sevent's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 104
Quote:
Originally Posted by vanderweb
thank u

what do the 23 and the d stand for in this example? do i put this on any line of the code or does it need it's own line
That was just an example. It shows how you *could* put the character "d" at the 24th place in a string*. If you wanted to pad a sting with extra characters you could do a loop which inserted a certain character at each place up to whatever.

* Remember arrays start with zero
sevent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 12:55 AM   #18
footmonkey
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Posts: 639
Quote:
Originally Posted by uproared
Here, use this...

PHP Code:
function truncate_string($string$max_length){

    if (
strlen($string) > $max_length) {

         
$string substr($string,0,$max_length);

         
$string .= '..';

    }

return 
$string;


Looks good to me. I like seeing other people's code.
footmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 01:03 AM   #19
madawgz
8.8.8.8
 
madawgz's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Noordermarkt
Posts: 30,509
Quote:
Originally Posted by sevent
Yup. Just another reason why PHP kick way more ass than that overhyped new mother fucking Samual L Jackson film.
damn straight
__________________
TAEMDLRMSKRJIXMRLSMRJ.
madawgz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 01:09 AM   #20
xxxice
Confirmed User
 
Join Date: Feb 2002
Posts: 5,042
Hmm I still can't get it to work
xxxice is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 01:14 AM   #21
Jamie
Confirmed User
 
Join Date: Apr 2001
Location: CelebPay.com
Posts: 2,517
Quote:
Originally Posted by vanderweb
Hmm I still can't get it to work

That's not a question, next.
__________________
CelebPay: Promote Celebrity Reviews
i/c/q - :1851935
Jamie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 01:26 AM   #22
Naja-ram
Confirmed User
 
Join Date: Aug 2006
Location: Iran
Posts: 639
in what ways is php better than java?
in what ways is java better then php?
Naja-ram is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 01:27 AM   #23
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
For the bloggers, Whats the code for getting a current date/time in a rfc 822 format?
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 04:18 AM   #24
LazyD
Confirmed User
 
Join Date: Aug 2004
Location: www.calidi.com
Posts: 102
Quote:
Originally Posted by teksonline
For the bloggers, Whats the code for getting a current date/time in a rfc 822 format?
date('r');
but that doesn't always work properly (especialy when using feed validator)... so if it doesn't work use the long way : date('D, d M Y H:i:s T');
__________________
Calidi studio
http://www.calidi.com
ICQ: #18466283
LazyD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2006, 08:49 AM   #25
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
ooh fire yourself T is not the answer
teksonline 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.