I need a php script that can create a posts in my site . For example see this : www.narutohaze.com/news/obito . I want a php script that can edit this html post heading and the image below only and post it with other name like 123.com/news/anything.html ? . Is it possible ? . I need a script in which i can simply put image and post ? . with same design of my site ?
Your post isn't too clear. What do you actually want: A content management system? Plenty of options available, use search. Or a simple script that will use some text you input to generate a static HTML file from a template? That is still a CMS and there are ones out there that generate static HTML pages, rather than dynamic. Again, use a search engine and you will find plenty to choose from. Or scrape content from another site and "customise" it as your own? (This is a big NO, unless you have permission from the content owner.)
you want an interface for you? so you can update the header/body /content/images? if that's what you mean, you'll be altering the pages so they wont index because they'll be dynamic changing. Otherwise you can save them while also using dynamic interface. Use a PHP script that places content to a $body for <body> HTML tag and make the PHP script grab a file (body.txt file) perse make yourself an interface with a textarea box where you post the new body text and submit it like a form the string gets passed $_POST method...and fwrites writes it to a text file then your HTML page where the <Body> tag is at.. will then have a <?php includes('body.txt') and your header and all HTMl code can be posted to your interfaceincluding <H1> New Article </H1> it will then render to your HTML page in HTML as a header tag. keep your interface offline so nobody can inject it and that will save you time in building an interface that doesnt need umpteen injection/sanitation codes to it. IF that's even what you're asking....but I'm sensing that's what you're asking about
No No you dont understand Listen see this : For example : This is my empty source ( design ) for exp : <!DOCTYPE html> <html> <body> <h1>#</h1> <p>#</p> </body> </html> ---------------------- I want a php script that is simple and easy to use in which i can put Heading : And it will replace <h1>#</h1> with <h1>133</h1> Like a wordpress ^^ . And then i can publish it on site with 123 or something.html Just this so does anyone understand now ?
It's not that simple. At best you'd need ajax to generate the field, and send it to the back end script for processing, saving as a file or into the database. And you need to make it really, really secure or your site will be defaced in no time. Why not just do it properly and use a CMS (like WordPress). Advantages quick setup other people stress over security, you just have to make sure you update the new releases you don't have to write code changes to menus, content will be instant across all files
I know what you want, you want a php script that process it's script and creates/saves an HTML page. It's possible using mybb forum script as every post is saved as HTML. Do you need CMS or just idea about how to do it?
Yes its like that . Im tired of putting manualy image and a heading on my site posts like this : www.narutohaze.com/news/obito . I need a script in which i can simply put a image link and heading and press enter so that the file can easily make a new post with 123.html
You want to install a proper CMS, is what you want. As others have suggested, Wordpress is good for this - if you run it on wordpress.com you can use your own links/domain as well, you don't have to have the wordpress.com-domain. So... why make things that aren't meant to be? Just use a proper management system, and you'll have easy way to upgrade in the future, or create more elaborate, custom pages etc.
It's very easy to find a CMS to generate static HTML using search: http://lmgtfy.com/?q=php cms to generate static html (Coding one wouldn't be too difficult either. At one point I used Blosxom, but this was Perl based and I ended up writing something similar - for my own use - in PHP.) However, you might want something a bit more powerful. cmsmatrix.org has a big list of them (and you can compare them). There are many choices available and not just the popular ones such as WordPress that might be more suitable for you. Choose one that meets your needs, not just because many people recommend it.
It's fairly simple to do this in PHP without a CMS or actually generating static HTML pages (that would be a CPU/memory hog!) You want to generate 'fake' HTML pages that actually still work like a PHP page with values, but look like a HTML URL. We will do this by using so-called 'slugs'. For example, I have a page which gets called like this in PHP: mysite.com/page.php?id=15 We're going to make it look like: mysite.com/my-title.html What you want to do is save your data to a MySQL database, and add a 'slug' column. Your slug column can be anything like your page id, title, etc, just make sure it has no whitespaces or special characters. Have your PHP script work with the 'slug' rather than 'id', so calling your page would be page.php?slug=my-title-here Now in your .htaccess file add: RewriteRule ^news/(.*)\.html page.php?slug=$1 Code (markup): This will make everything from your website that looks like /news/my-article.html actually call your PHP script like page.php?slug=my-article. In your page.php simply get the corresponding content in an array with an sql query "SELECT * FROM tbl_news WHERE slug = $_GET['slug']"