Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

4Chan Replica

Name: Anonymous 2011-09-22 7:56

I'm making a 4chan replica script based of a moderately modified version of tinybb and I'm having a little trouble finding out how page requests work around here.

Say you wanna get to page 2 og /b/, the @ the end of the url you'd just type in "/g/2" right?

Problem is, I'm not sure how 4chans script uses that arg, say you appended "/" to the url as so "/g/2/" it doesn't work, so that tells me this is not a directory right?

How the fuck do I pick this up in my php script so I can know what page to deliver?

You can see it here http://autoitunderground(.)tk/chan/b/

Name: Anonymous 2011-09-22 8:01

lol @ my retarded typo's...
Lets say we're on this url, the main page~
http://boards.4chan.org/b/

No lets say we want to retrieve page 2 of "/b/", we would give a url something like this~
http://boards.4chan.org/b/2

How do I pick this up in a php script?

I'm used to only dealing with "script.php?Page=20"

Name: Anonymous 2011-09-22 8:02

mod_rewrite

Name: Anonymous 2011-09-22 8:03

now GTFO

Name: Anonymous 2011-09-22 8:20

I still don't know how to pick this up in my php script :(

I can't exactly pick it up with $_GET[]

Name: Anonymous 2011-09-22 8:35

Wakaba is a php script that 4chan like imageboards use. http://wakaba.c3.cx/s/web/wakaba_kareha

Name: Anonymous 2011-09-22 8:35

>doesn't know mod_rewrite
>doesn't know $_SERVER
typical php "programmer"

Name: Anonymous 2011-09-22 8:49

>>6 why would you recommend shit?

Name: Anonymous 2011-09-22 8:53

>>8 It works, is easily hackable and is public domain software.

Name: Anonymous 2011-09-22 8:55

if I use mod rewrite, it only rewrites the url and retrieves the alternate script, but I still see no way of how I could pass the int "1" as a param to the script so I can know what page was requested, while keeping the url as "/b/1" instead of just "/b/"

Name: Anonymous 2011-09-22 8:57

>>but it says they're perl, that's not cool at all.

Name: Anonymous 2011-09-22 9:16

if I use mod rewrite, it only rewrites the url and retrieves the alternate script
Wrong. I might add to say: Fucking wrong, moron.

but I still see no way of how I could pass the int "1" as a param to the script so I can know what page was requested,
That's because you don't understand what you're doing.

while keeping the url as "/b/1" instead of just "/b/"
how about you go back to /b/?

Name: Anonymous 2011-09-22 9:46

Actually, yeah, I noticed mod rewrite does exactly what I needed, but it doesn't seem to work on my server.

Name: Anonymous 2011-09-22 12:01

it doesn't seem to work on my server.
> my server

Name: OP's pocket translator 2011-09-22 14:18

>>13
>Actually, yeah, I noticed mod rewrite does exactly what I needed, but I'm too dumb to make it work on my server. I also should go back to /b/. And cocks, I love them.

Name: Anonymous 2011-09-22 15:17

>>13
mod_rewrite works on all standard web servers out of the box - you might have to enable it (a2enmod rewrite on Debian), but that's about it.

>>13
How did I into quotes?

Name: Anonymous 2011-09-22 18:50

How did I into quotes?
Who are you quoting?

Name: STUPED MOD_REWRITE 2011-09-23 10:01

Stupid mod_rewrite don't workeded for me on my wamp, any way, I've got it working, but not the way that it was intended.

Name: STUPED MOD_REWRITE 2011-09-23 10:02

Edit: I didn't get the mod_rewrite to work, just the 4chan replica php script, without mod thing, fuck..

Name: OP's pocket translator 2011-09-23 11:37

>>19
I wish I knew what I was doing, even a toy language is too complicated for me. I am also a huge faggot and mon visage needs to be anally raped.

Name: Your fleshlight 2011-09-23 16:42

>>20 I wish wasn't an asperger, sometimes I find myself rubbing my dick on my chiguaguas quarter inch vagina , don't blame me, the world just doesn't understand me so I seclude my self in my room void of social activities because I find people's conversations dull and boring because I'm on another intellectual spectrum, any way, I'm to ugly to get laid by any chick who is normal so that's why I refer to a legitimate server side scripting language years in development as a "toy language", due to my meticulous obsession of sitting behind my monitor for days on end all while my ass is developing ulcers from so much sitting every day, but I don't care, since no one will ever appreciate my anal cavity like my dog spot, sometimes I even think my mother wishes she aborted me because I'm just a parasite leeching off of her life, I've failed socially so I decided to pursue the goal of understanding low level programming languages which every one knows that people who are good with it, generally display autistic characteristics and anti-social behavior, I mean, because really, who else will spend their life behind a monitor staring at a luminous screen which will most likely depreciate my vision soon.

Name: Anonymous 2011-09-23 17:34

>>21
I wish wasn't
stopped reading here

Name: Anonymous 2011-09-23 18:15

>>22 I know you read it ALL you liar.

You are the worst kind of person, a person who probably molests things that don't want to be molested and every one around you always feels awkwardness you fuck face massive faggot piece of shit, I hope you die taking a shit so your mom doesn't live in misery any longer.

Name: Anonymous 2011-09-23 18:20

>>23
longer.
stopped reading here

Name: Anonymous 2011-09-23 18:26

http://www.biblestudytools.com/psalms/1-5-compare.html

When the LORD judges them, their life will come to an end. Sinners won't have any place among those who are godly.

Name: VIPPER 2011-09-23 18:28

When the SUSSMAN judges them, their life will come to an end. Un-VIPs won't have any place among those who are VIP QUALITY.

Name: Anonymous 2011-09-23 20:22

Any way, I actually lied about getting the script to interpret the page requests in the manner stated before and realized that lying about it isn't gonna get me anywhere, can you help?

=(

In case I'm not giving ya'll enough info on this~

I have indulged myself into the mission of revealing to myself how moot's chan interprets these links <a href="1">1</a>.

Obviously, that's a request for page 1, I jus wanna know how I can  pick this up in my php script so I can know what page was requested, and the stupid mod rewrite wont work under uniserver, even though it says the module is loaded and ready to go in both server-info and phpinfo()

Name: VIPPER 2011-09-23 20:44

HOW'S MY POSTING? LEAVE A NOTE AT HTTP://SECRETAREAOFVIPQUALITY.NET/SAOVQ/

NO MODS NO GODS

Name: Anonymous 2011-09-23 23:59

Name: Anonymous 2011-09-24 1:26

>>1
Take it to http://7chan.org/pr/ you'll get help there.

Name: Anonymous 2011-09-24 6:30

>>27
Step 1: Make mod_rewrite work
Step 2: Redirect every non-file request to your script
Step 3: Parse $_SERVER[REQUEST_URI]

Name: Anonymous 2011-09-24 16:07

>>30 http://7chan.org/pr/1.html?

LOL WUT?


Thanks for the help attempts dude, but ~
>http://7chan.org/pr/1.html?
>7chan.org/pr/1.html?
>/pr/1.html?
>1.html?
>html

Any way, I discovered why mod_rewrite wasn't working last night while smoking some weed and it hit me!

Apache has an error log..

So I checked the log and saw about 1000 lines of the same error saying "followsymlinks" is disabled, so in turn, mod_rewrite would not work and initiated a server error...

So I threw this into my virtual host and bam!
Options +FollowSymLinks
RewriteEngine On

I've got it working!

Name: Anonymous 2011-09-24 17:20

>>32
Do you want a medal or something?

Name: Anonymous 2011-09-24 21:15

it's worth mentioning that if you were using a web framework as you should, it would probably handle this for you.

what they do is to parse the reuqest path according to some rules (usually regexp) and call the appropiate functions based on that, extracting the matches and passign them as parameters.

PHP most useful feature is also its own worst enemy, it so easy to drop a text file and make it work that many thing that's the right way to proceed.

Name: Anonymous 2011-09-25 20:03

it so easy to drop a text file and make it work that many thing that's the right way to proceed.

Damn, so many assholes are attempting to upload php files that allow them to delete and grab any file on my machine, luckily I caught it right when it happened cause I was emailed when they uploaded it.

I didn't know you could upload a fucking picture that actually has php code in it, funny thing was it was parsed as php when attempting to download the fucking file.

Don't change these.
Name: Email:
Entire Thread Thread List