לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ‎print ‎"Hello World!"; if‎ ‎not rules.‎know ‎then rules.‎read(); חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > תכנות ובניית אתרים
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
תגובה
 
כלי אשכול חפש באשכול זה



  #6  
ישן 07-03-2006, 08:10
  yytg yytg אינו מחובר  
 
חבר מתאריך: 12.08.04
הודעות: 993
בתגובה להודעה מספר 5 שנכתבה על ידי fadey שמתחילה ב "כן, זו לא הבעיה. הבעיה היא:..."

בס"ד

זה מה שמצאתי בVB
קוד PHP:
 Public Type ptID3
  Title 
As String
  Artist 
As String
  Album 
As String
  Year 
As String
  Comment 
As String
  Genre 
As Variant
  GenreName 
As String
  Lyrics 
As String
  Lyrics3Tag 
As Boolean
  ID3v1Tag 
As Boolean
End Type

Public Function ReadFile_Tags(filename As String) As ptID3

On Error 
GoTo errorhandler
  Dim iTemp 
As Integer
  Dim newGenre 
As String

''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
' use the filename to get ID3 info
''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
    Dim lngFilesize As Long
    Dim fn As Integer
    Dim Tag1 As ID3v1Tag
    Dim LyricEndID As String * 6
    
''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
Open the file
''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''

    
fn FreeFile
    
    Open filename 
For Binary As #fn         'Open the file so we can read it
    
lngFilesize LOF(fn)                   'Size of the file, in bytes
  
''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
Check for an ID3v1 tag
''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
            
   'ID3v1 tag
        
    Get #fn, lngFilesize - 127, Tag1.id
        
     If Tag1.id = "TAG" Then '
If "TAG" is presentthen we have a valid ID3v1 tag and will extract all available ID3v1 info from the file
        Get 
#fn, , Tag1.Title   'Always limited to 30 characters
        
Get #fn, , Tag1.Artist  'Always limited to 30 characters
        
Get #fn, , Tag1.Album   'Always limited to 30 characters
        
Get #fn, , Tag1.Year    'Always limited to 4 characters
        
Get #fn, , Tag1.Comment 'Always limited to 30 characters
        
Get #fn, , Tag1.Genre   'Always limited to 1 byte (?)
            
        
HasID3v1Tag True
      
        ReadFile_Tags
.Title Replace(Trim(Tag1.Title), Chr(0), "")
        
ReadFile_Tags.Artist Replace(Trim(Tag1.Artist), Chr(0), "")
        
ReadFile_Tags.Album Replace(Trim(Tag1.Album), Chr(0), "")
        
ReadFile_Tags.Year Replace(Trim(Tag1.Year), Chr(0), "")
        
ReadFile_Tags.Comment Trim(Replace(Trim(Tag1.Comment), Chr(0), ""))
        
ReadFile_Tags.Genre Tag1.Genre
        
        
'// si no hay nada poner default 'Other'
        Populate_Genres
        If Trim(Tag1.Genre) = "" Then iTemp = 12 Else iTemp = CInt(Tag1.Genre)
        If iTemp <= 0 Then iTemp = 1 Else iTemp = iTemp * 22
        newGenre = Trim$(Mid$(gsGenres, iTemp, 22))
        If Trim(newGenre) = "" Then newGenre = "Other"
        ReadFile_Tags.GenreName = newGenre
        gsGenres = ""
     Else

        HasID3v1Tag = False
          
     End If
        
     ReadFile_Tags.ID3v1Tag = HasID3v1Tag
        
     '
lyrics3 tag
     
If HasID3v1Tag True Then
        Get 
#fn, lngFilesize - 136, LyricEndID 'look for a lyrics 3 tag
     
Else
        
Get #fn, lngFilesize - 8, LyricEndID   'look for a lyrics 3 tag
     
End If

''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
' Close the file
''''''''''''''''''''''''''''''''''''''''''''''''''  ''''''''''
     Close
     
     '
lyrics3 tag?
     If 
LyricEndID "LYRICS" Then 'got one, go get it
        HasLyrics3Tag = GetLyrics3Tag(filename)
        ReadFile_Tags.Lyrics = sLyrics
        ReadFile_Tags.Lyrics3Tag = HasLyrics3Tag
     Else
        HasLyrics3Tag = False
        ReadFile_Tags.Lyrics3Tag = False
     End If
            
  Exit Function
        
errorhandler:
    err.Clear
    Close
End Function 

תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 06:19

הדף נוצר ב 0.06 שניות עם 11 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2026 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר