![]() |
I need a quick php script done......PROGRAMMERS!!!
I have directories with upwards of 2000 files in them
the files all are formatted like this this-is-the-file.php what I need to be able to drop a php script in the directory and output html based on the filenames so if the file name is what I said above, the php script will output <a target="blank" href="this-is-the-file.php">this is the file</a><br> it need to take the words in the file name, remove the dashes, add the href tags in there, and output the html to me I know this is CAKE to do, I just don't have anyone to do it for me right now....how much will someone charge me? |
anyone?
........... |
here is a bump for you :thumbsup
|
get in touch with WOJ he's reliable and does good work sure he can whip something up for you...
www.wojfun.com |
Quote:
I need it done now |
Quote:
|
Code:
#/bin/tcsh upload it and run it in that dir with ./makelist.csh > outputfile.html |
darksoul - does kon still run adultxspace?
|
Quote:
8chars |
Quote:
i don't do ssh :) haha |
Quote:
let me try it in php: Code:
<?php |
Quote:
Parse error: syntax error, unexpected '{' in /usr/home/keywords.php on line 3 |
ia
I forgot to close something should be: Code:
while (($file = readdir($dir)) !== false) { |
If you want to just drop it in a directoty and browse to that file, call it something like "listfiles.php" and change these 3 lines:
$fd = fopen("outputfile.html",w); fwrite($fd,$text); fclose($fd); to simply echo $text; then in your browser just: http ://www.yourdomain.com/pathto/listfiles.php |
I just spotted a few things I missed there
let me redo it. |
Quote:
Parse error: syntax error, unexpected '"' in /usr/home/keywords.php on line 5 |
Quote:
|
Quote:
Code:
$text .= "<a href=\"$file\">".str_replace("-"," ",$file)."</a><br>"; |
You silly php peoples...
|
Quote:
|
Quote:
PERFECT! it workjs like a charm! |
shit, hold up, it is leaving the .php on the end of link
|
Quote:
|
Here it is
Code:
<?php also removed the ".php" from the title |
Quote:
Code:
str_replace("-"," ",substr($file,0,-4)) |
you all rock so much
anyone who helped me in this thread if you have any links you want across about 50,000 seo'ed pages for the next month or so, let me know not much traffic, but it will help ya gain some se rankings |
All times are GMT -7. The time now is 04:03 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123