Jump to content

php coding discussion


tpdude
 Share

Recommended Posts

Dear friends, How are u ? i have started coding for new website to deliver wallpapers, ringtones, music and videos. I am facing lots problems related to mysql database structure and seo. I hope you people help me out this problem. Iam not good in english so kindly avoid my silly english related mistakes. Special Note for Webmaster and Moderators - I specially request to forum owner and moderators that donot close this topic until my problem is not resolved. Iam not here for spaming and not advertising any product here.

Link to comment
Share on other sites

Thanks sir for quick reply.As i already told I am working on a site that contain wallpapers etc. Iam good in php and mysql but always face problem in design. :) Take a look a santabanta.com. They offer wallpapers in different categories. In same manner i want to deliver content to visitors. Take a first look my home page. There are five different categories..(1) Wallpapers (2) Videos (3) Songs (4) Ringtones (4) Games (5) Applications. Directory strucuture for wallpapers is-Wallpapers > Indian Actress > Katrina > sizeof wallpapers Wallpapers > Indian Actor > Akshay Kumar >sizeof wallpapers Wallpapers > Global Actress > Jessica Alba >sizeof wallpapers My index page which is located in wallpapers folder shows path of file like home(with hyperlink) > Wallpaper and categories like Indian Actress, Indian Actor, Global Actress . Now second index page is located in Indian actress folder. This index page shows path of file like home(with hyperlink) > Wallpaper (with hyperlink) > Indian actress and list of indian actress(katrina, karina, priyanka etc. ). Third index page located in katrina folder. This index page shows path of file like home(with hyperlink) > Wallpaper (with hyperlink) > Indian actress (with hyperlink) > Katrina and gallery of katrina wallpapers. Another file show.php is also available in katrina folder. This show.php shows path of file like home(with hyperlink) > Wallpaper (with hyperlink) > Indian actress (with hyperlink) > Katrina (with hyperlink) and show wallpaper acording users screen size (using javascript). Please help me to reduce number of index files and suggest me mysql database structure for wallpaper category.

Edited by cyberdude
Link to comment
Share on other sites

You shouldn't represent the different categories as different folders and files. Everything should be stored in the database, you really only need 1 PHP file to display any of the categories. You can send in the URL which category to display, e.g. category.php?id=10. The categories table in the database should have one column for the ID and one for the title (plus any other information you want to save about each category), plus a way to say what the parent is. If each category can only have one parent, then you can add a parent ID field to the categories table to list what the parent is. If a category can have more than one parent then you need a separate table which lists parent IDs and child IDs. This would also require some sort of admin system where you can add and remove categories by picking the parent and filling out the rest of the information. When you upload your files, you would just pick which category they are in. So, like categories, if each file can only be in one category then you can just add a field to the files table to hold the category ID that the file is in. If files can be in multiple categories, then you need a separate table to list file IDs and category IDs.

Link to comment
Share on other sites

Thanks for reply. If i only has one page for gallery then can i face problem related to seo ? because each time i look database for title, heading, keywords, description etc. When this question aries in my mind i search on google and found this page "http://www.100seotips.com/Google%20Optimization.html". In 7 th point

It is known that the web evolved greatly in recent years, and that more and more pages based on dynamic scripting languages (PHP, ASP, etc.).. But it seems that Google is limiting the amount of dynamic pages it indexes, so we could include some static pages ... when the momentum is not necessary.
According to this article you should consider on static page instead of dynamic page and also consider on hyperlinks for example gallery,php?name=katrina kaif is much optimized than gallery.php?id=12 where katrina kaif id is 12.Correct me if iam wrong.
Link to comment
Share on other sites

Just because someone says "it seems" that Google is doing a certain thing doesn't mean they actually are. I don't put a lot of stock into what "SEO experts" say, because in the end it's not what they say that matters, it's what the search engines actually do. If you're concerned about it, look into using URL rewriting to point URLs with titles in them to a PHP script that can read the IDs and look them up.

Link to comment
Share on other sites

Help needed. File download is working for pc but not on mobile. When i try to download image(jpg) on my my nokia 3110c file downloaded successfully. When i try to open it error msg appeared that "file not supported". But this file downloaded by usb cable through pc iam able to open it without any error. What am i doing wrong ? header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.basename($file_name).'"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize($file_name)); readfile($file_name); exit();even iam using flush() before readfile but it is not works. Please help me.

Edited by cyberdude
Link to comment
Share on other sites

Help needed. File download is working for pc but not on mobile. When i try to download image(jpg) on my my nokia 3110c file downloaded successfully. When i try to open it error msg appeared that "file not supported". But this file downloaded by usb cable through pc iam able to open it without any error. What am i doing wrong ? header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.basename($file_name).'"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize($file_name)); readfile($file_name); exit();even iam using flush() before readfile but it is not works. Please help me.
are you saying when you download the image to your phone from your PC it works? Just not when downloaded from your webpage?
Sounds to me like your phone doesn't support jpgs.
au contraire mon frerehttp://www.forum.nokia.com/Devices/Device_...s/3110_classic/ Edited by thescientist
Link to comment
Share on other sites

are you saying when you download the image to your phone from your PC it works? Just not when downloaded from your webpage?au contraire mon frerehttp://www.forum.nokia.com/Devices/Device_...s/3110_classic/
Thanks for reply friend but my device support mp3, jpg, gif and 3gp media formats. One thing i found that downloaded image takes 11kb size and saving in images folder but when i transfer image from pc to mobile by usb cable, it's saving in memory card with 15kb. Iam able to see this image from memory card but not from images folder (error- file format not supported).Help me.
Link to comment
Share on other sites

Ok, I stand corrected. I didn't look it up, though I did find it odd that a phone wouldn't support pics (unless it was a really old one, like mine :) )This:
When i try to open it error msg appeared that "file not supported". But this file downloaded by usb cable through pc iam able to open it without any error.
Seemed to indicate that the file could not be opened on the phone, but when it was transferred from the phone to the pc it could then be opened.
Link to comment
Share on other sites

Thanks justsomeguy and other members for reply. Sorry i was out of station. Currently i decided to link content directly. :) Can you suggest me which DOCTYPE will you prefer to design mobile side ?Iam using following DOCTYPE-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">Iam developing content delivery site and want to integrate smf forum in it. :)

Edited by cyberdude
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...