Jump to content

scs

Members
  • Posts

    86
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    USA

scs's Achievements

Member

Member (2/5)

0

Reputation

  1. So I went ahead and tested the code in my second post. Everything works the same but when ever I try to access a link like: http://www.mysite.com/manga/Naruto/001.5/ I still get a 404 any advice to point me in the direction so I can figure this out would be extremely helpful! The trouble it would cause to "simply" rename the folders so I don't have .5 would take weeks..
  2. cant edit my post.. for the part where I want to "change ([0-9]+) to ([^/.]+)" I mean like this: Options +FollowSymlinks RewriteEngine on RewriteBase /manga/ RewriteRule ^mangas/([^/]+)/([^/]+)/$ - [F,L] RewriteRule ^mangas/([^/]+)/$ - [F,L] RewriteRule ^mangas(/?)$ - [F,L] RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)(/?)$ index.php?manga=$1&chapter=$2&page=$3 [L] <<< note the change on this line from the original RewriteRule ^([^/.]+)/([^/.]+)(/?)$ index.php?manga=$1&chapter=$2 [L] RewriteRule ^([^/.]+)(/?)$ index.php?manga=$1 [L]
  3. So my problem is probably simple I just don't understand htaccess very well. Here's the original working rewrite Options +FollowSymlinks RewriteEngine on RewriteBase /manga/ RewriteRule ^mangas/([^/]+)/([^/]+)/$ - [F,L] RewriteRule ^mangas/([^/]+)/$ - [F,L] RewriteRule ^mangas(/?)$ - [F,L] RewriteRule ^([^/.]+)/([^/.]+)/([0-9]+)(/?)$ index.php?manga=$1&chapter=$2&page=$3 [L] RewriteRule ^([^/.]+)/([^/.]+)(/?)$ index.php?manga=$1&chapter=$2 [L] RewriteRule ^([^/.]+)(/?)$ index.php?manga=$1 [L] Note the "mangas" folder is where the chapters are (Root/manga/mangas/Naruto/) resulting in: http://www.mysite.com/manga/ http://www.mysite.com/manga/Naruto http://www.mysite.com/manga/Naruto/001/ http://www.mysite.com/manga/Naruto/001/2 (page 2) now what I have run into is some chapters have 001.5 http://www.mysite.com/manga/Naruto/001.5/ That gives me a 404 on my server. I want to either change the whole rewrite or add the option for this variant. I already tried this below. and it does not work. Original RewriteRule ^([^/.]+)/([^/.]+)/([0-9]+)(/?)$ index.php?manga=$1&chapter=$2&page=$3 [L] Mine RewriteRule ^([^/.]+)/([^/.]+)/([0-9]+).([0-9])(/?)$ index.php?manga=$1&chapter=$2&page=$3 [L] taking note to this .............................................^^^^ I also tried that with the plus ([0-9]+) and still did not work and I did not replace the original line. I added my line right below. Now for the ([0-9]+) part. I might have some mangas (later on) that might have 001.a. Would it b possible to just change ([0-9]+) to ([^/.]+) then that way I could just skip the whole "adding .5 .a" and just grab all the of chars between the / / or would that cause the whole rewrite to fall apart? I figured I would ask that before I try it. Hope that all made sense. getting tired after working on the site all day >.< would be thankful for any advice on the subject Thanks!
  4. I didn't find any include_path in my php.ini nor did I find anything relating to PEAR =/ You know how the commands should look? I'll just add them manually Also "whereis" command said PEAR (since php-pear pulled up nothing) is located at # whereis pear pear: /usr/bin/pear /etc/pear.conf /usr/local/bin/pear /usr/local/etc/pear.conf /usr/share/pear seems like there is a bunch of messy stuff happening >_<
  5. SOAP sounds the best way to pass it. SOAP uses XML already to pass params between servers. and with SOAP you can use just about any other programming laughing to send/receive it as well.
  6. It found and installed it. but I still get the error. It seems like PHP cant find PEAR or something like that. Not really sure. I did come across some forums that said I need to tell PHP where to find PEAR. Maybe that's my problem? and if so then what would I edit :confused:
  7. So I installed a script that needed PHP5. So I manually upgraded to PHP5. Well there's an error and the creator of the script says I need to reconfigure PHP5 with PEAR. The odd thing is I see PEAR installed. Another problem is I cant find the site that I used to install PHP5 from yum. So I'm looking for a easy set of commands to reconfigure/install PHP5 with lots of extensions and PEAR configured with it. Hope someone can help Thanks for any help
  8. Hi, So I have this idea for making a Binary container with php. Google has not been much help so im just looking for a little insight so I can get started. I dont really want code (or at least alot) cause I want to be able to make this on my own. What I want to know is first is it possible to make a Binary container using just php? To explain what I mean by a Binary container. Think of .MYD files in MySQL or even .DLLs. A File that holds and is constructed of Binary. Not just a file you split using explode() function. If that is possible then my next question is do I just use regular php binary read and write? then just handle the data with binary trees? If I can get those to answered I should be able to research further on my own and make it. Thanks in Advance Z
  9. scs

    seems so simple.

    wow it was even more simple than I thought.. I need some work in regex Super thnx! ;D
  10. I have a expression which finds a hexadecimal thats 32 charaters long. Im just using match all to make sure it finds what im looking for. I want my end result to be just a preg match. preg_match_all('((#?([A-Fa-f0-9]){3}(([A-Fa-f0-9]){3})?).{32})', $content, $output); It finds it out of the 135 lines. Most of the lines are not even hexadecimal.. Well I have a simple solution but cant figure how to do it. Theres another 8 hexadecimal set that I already know. The 8 is infront of the 32. So example [ 8 ][ 32 ] d7d8v94314619d326c74fe875f26d4561c4c662e So my question is how to I add the 8 in front of my expression? I've tried.. preg_match_all('(' . $hex_8 . ')((#?([A-Fa-f0-9]){3}(([A-Fa-f0-9]){3})?).{32})', $content, $output); preg_match_all('(~' . $hex_8 . '~)((#?([A-Fa-f0-9]){3}(([A-Fa-f0-9]){3})?).{32})', $content, $output); I used ~ cause I saw someone use it in another expression. All I get is an error. Like Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '(' Any ideas? Thnx
  11. scs

    Help parsing a URL

    wow It worked! Thanks so much!! Zach
  12. Hi all I'm having some trouble parsing a URL from downloaded site content using fsockopen. I'm making a Voting system for my site and this will be part of it. I am simply just getting a URL. The URL is very unique yet I can't seem to get it. The end of the URL has a session tag so its always changing. There's also a class in the URL tag that's not on any other link. That should definitely help! I thought. lol So here is what I got so far After downloading the site into a variable I'm trying to parse all info I want from it. $regex = '/href="(.*?)" class="buttongo"/'; preg_match($regex, $output_data, $stuff); print_r($stuff); //Nothing comes out The URL looks like this <a href="http://www.mysite.com/index.php?a=in&u=username&sid=rjhgf2hWm9WDFTkgx9JJd290udtkIgfM" class="buttongo">Enter</a> I want the URL as a whole so I was just trying to match the unique class. And I know the data is correct because I got the URL from echo 'ing the data im parsing. Also as you can see in my code I didn't include any of the tag. Like, <a> cause im not sure what I need to escape and if thats part of my problem. I've never been able to find html tags very well. So any tips on that would be great as well! I hope thats enough info to understand what I am doing. Thanks Zach
  13. I was expecting code but I think that lil change of words I think did it o_o lol thnx I'll try that
  14. Hi I am trying to make a PHP Proxy usage. Not for being a proxy, but for using the proxies for different IPs. Its for a ranking system on my site. Basicly I'm trying to make a script that uses free proxies like (www.w0t.us) and submits a script from my site. And so in the long run it would run throw a list of free proxies and submit my script so that it runs properly. Though I havent even made my script yet cause this is the first step in my project. I think the curl class is needed for this. So the steps for this script would be (Array) List of free proxies (Loop) Loop through list Submit my script to proxy Read output data Sounds and looks simple. My lil brain just cant figure it out Anyone know hows to do this? Thanks in advance Z
  15. Nope, sry that didnt help. All 3 of those links have static widths for the 2 outer cells. One of them was the exact opposite of what I want Thnx for trying though!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.