Jump to content
xisto Community

vicky99

Members
  • Content Count

    54
  • Joined

  • Last visited

  1. Dear FriendsI need solution to a problem. The problem is as under:I am creating certain files (playlist) in server disk when user selects some songs. The files are created in ram format. What I want to do is to delete these files created during a particular session. Is it possible to do so? Now I am deleting these files using on Unload event fired by JavaScript. I am using PHP.
  2. Thank you very much..!Sir Hercco, Today I would try to explain the problem.I have created a system for playing music online. When a user clicks the link of the music file a pop up window appear and plays the song. I send the id of the song using query string and receive it and then get the link of the song from database. It works fine. Then in my last post, I mentioned that I want to provide my user with the facility to select multiple songs which would be played sequentially. For that, I used checkbox and send ids in the same manner I did previously. I then queried the database and received the links to the songs.Now, how to play these songs in a sequential order? This is the base problem. I have employed various methods but failed to achieve the goal.One of the methods was to use PHP header function. Using it I got very near to my goal. I could play the selected songs sequentially but in an external player (interface). I want to play the songs within the web page (in the pop up window mentioned above).If you want to know what I did please let me know .I would post my codes here. I hope to hear from you very soon.With Regards
  3. Dear Friends I want to stream music from my website. The file format is .rm. People say that one need a Helix Server or other media server to stream. I have found a solution to this problem as well. I read an article about streaming music. It tells that if the size of the media file is small and the byte rate of the media file is lower than that of the user internet connections byte rate, the file get streamed automatically from HTTP server. In theory, any file is "streamed" by a web server that is, sent back to the client in small pieces. What makes media files special is that a media player can start playing the file even before it receives the full file. However, supposing the media player downloads one second of music, and plays it, and the data for the next second has not yet been downloaded, it will stop immediately. You will have to click Play again. However, if the bit rate of the media file is less than the bit rate of the connection, the player will always be able to download faster than play, and so, while there may be delays in playing the media, it won't stop. I have uploaded couple of files on the server and they are working. But in my endeavor of making a contemporary online music website I am facing many problems which are as follows:- I am using object and embed tag to play music in WebPages. I have created a RAM file which contains the links of the media files i.e. RM files. The RAM file is embedded to the web page e.g. <embed src=âhttp://forums.xisto.com/no_longer_exists/ â>. Up to this point everything is under control. Now I want to let my users choose multiple songs. To do that, I used check box to select more that one song. I used query strings to send the links or id of the selected songs and retrieved the urls on the page where the songs would be played. Here the problem arises. How can I add multiple url to embed tag. I found out a solution but it did not work. My idea was to create a RAM file (Many of you guys may already know about it yet I would like to explain the phenomenon. One can create a RAM file which may contain more than one media file links. For example, aramfile.ram may contain both http://forums.xisto.com/no_longer_exists/ and http://forums.xisto.com/no_longer_exists/. If such a RAM file is embedded to a web page multiple songs can be played in a random manner) dynamically which would contain the list of links we received from query string. But with PHP, one cannot create a file on web server nor can open a file with write option. According to me it was the best possible solution but it is not feasible. I know that many professional personal employ this method. How they do it is mystery to me. Then I began my search to find a way out. Fortunate I found out a way. Answer to my problem was HTTP HEADER. I would like to share what I understand about HTTP HEADER before I proceed. Using headers server and browser communicate. Server sends headers before sending any other data. Headers can contain many types of information and instructions that the server and browser use to help each other know what to do next. Further PHP can be used to manipulate headers to get desired output. Using the following the codes one can create a ram file. header("Cache-control: public"); header("Content-Type: audio/x-pn-realaudio ram;"); header("Content-Disposition: filename=a.ram"); echo $fres; exit(); It did work. But in external player. I could not play the song inside the web page. So, friends I would be very grateful if some one helps me out âŚ..
  4. Dear FriendsToday I would like to discuss an issues regarding bandwidth and data transfer of which every one here is accustomed to. So I am drawing a scenario for the said issue. Say for example, I have a free web hosting account which supports PHP, MySQL, and many other server side technologies. But its server space and bandwidth are limited, further if I have a file hosting account which provides unlimited server space and unlimited bandwidth which does not support server side technologies. If I upload a file to my file hosting account and provides the link in my website and if a user access the link which account’s bandwidth will be calculated. If bandwidth of both the account is calculated than whose bandwidth is consumed more, web hosting or file hosting account? I have found answer to these questions. Though I m not sure about it. In this particular scenario, when the page containing the links for the files is viewed, the bandwidth will be calculated at the web server. When someone actually clicks a link to download a file, the bandwidth will be calculated at the file server. If no one clicks a link, no bandwidth will be consumed from the file server.I would like and welcome every ones comment and more appreciably comments from administrators and moderator team because this is part and parcel of their every day’s job. Thank you..
  5. Dear Friends Last time around I wrote a program named Hello World using COBOL. Today I will try to analyze the program. So I will rewrite the program for your convenience.000100 IDENTIFICATION DIVISION.000200 PROGRAM-ID. HELLO.000300 ENVIRONMENT DIVISION.000400 DATA DIVISION.000500 PROCEDURE DIVISION.000600000700 PROGRAM-BEGIN.000800 DISPLAY "Hello world".000900001000 PROGRAM-DONE.001100 STOP RUN.A COBOL program always has four divisions and these four divisions are always having the same names: i) IDENTIFICATION DIVISION ii) ENVIRONMENT DIVISION iii) DATA DIVISION iv) PROCEDURE DIVISION In Hello World program, lines 000100 and 000200 are the IDENTIFICATION DIVISION. This division is used to mark the basic information about the program. In this program, the IDENTIFICATION DIVISION contains only the PROGRAM-ID, HELLO.Line 000300 is the ENVIRONMENT DIVISION, which is used to identify the environment in which the program is running. Keep in mind that COBOL is intended to run on many unlike types of machines, and this section is used to handle the differences between various computers. In this case, the program has no specialized machine necessities, so the ENVIRONMENT DIVISION is empty.Line 000400 is the DATA DIVISION, which will contain any data that the program operates on. This program has no data, so the DATA DIVISION is empty.Lines 000500 through 001100 are the PROCEDURE DIVISION. This is the meat of the program--the part that does the work planned by the programmer. The PROCEDURE DIVISION contains two paragraphs at line 000700 (PROGRAM-BEGIN) and line 001000 (PROGRAM-DONE). The term paragraph has a special definition in COBOL that will be covered a bit later in today's lesson. All the actual work in this program is done by line 000800.
  6. Hi everyone, I'd like to explain my idea for basic session handling to you guys. I've thought about it, and I can't see any problem with it, but I'd like other's opinions as well, please. Ok, here goes. So basically, there's two base cases that can happen. User visits any page, session class is initialized, etc. Case 1 - User not logged in; no cookie or session info in DB If the user is not logged in, has no cookie, and/or there is no session info in the DB for this user, any specified activities, protected like so: php: if ( $session->loggedOn() == FALSE ) { ... } the user cannot access them. If the user logs in, the session class will attempt to set a cookie containing a random session_id, which is stored in the database. If a cookie is unavailable, the session_id is still stored in the DB, and the SID is appended to the URL. $session->loggedOn() is set to true, and the user can access previously restricted areas. Case 2 - User is logged in If the user is logged in, the session class first looks for the cookie. If it's found, and the info (session_id, session_key) is valid, $session->loggedOn() remains at true, and the last_visited time in the DB is updated. In the constructor is a removeInactive(), which removes sessions that are inactive after a certain amount of time. There is also updateSession(), which does the checking for a session. On logout, all info is scrubbed, and removeInactive() is also called, closing the session.
  7. Dear friends HTML is the building block of any web page. Without it no pages can be written though there are some exceptions. Even you got to have some knowledge of HTML to write dynamic web applications. An HTML file is a text file containing small markup tags The markup tags tell the Web browser how to display the page An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor HTML is acronym of Hyper Text Markup Language. This time I will discuss about HTML tags. Dear friends HTML is the building block of any web page. Without it no pages can be written though there are some exceptions. Even you got to have some knowledge of HTML to write dynamic web applications. An HTML file is a text file containing small markup tags. The markup tags tell the Web browser how to display the page An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor. Do You Want to Try It? If you are running Windows, start Notepad. Type in the following text: <html> <head> <title>Title of page</title> </head> <body> This is my first homepage. <b>This text is bold</b> </body> </html> Save the file as "mypage.htm". Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page. Thing or two about HTML Tags:- HTML tags are used to mark-up HTML elements HTML tags are surrounded by the two characters < and > The surrounding characters are called angle brackets HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag The text between the start and end tags is the element content HTML tags are not case sensitive, <b> means the same as <B> -------------------------------------------------------------------------------- HTML Elements Remember the HTML example from the previous page: <html> <head> <title>Title of page</title> </head> <body> This is my first page. <b>This text is written in bold letters</b> </body> </html> This is an HTML element: <b>This text is bold</b>The HTML element starts with a start tag: <b> The content of the HTML element is: This text is bold The HTML element ends with an end tag: </b> The purpose of the <b> tag is to define an HTML element that should be displayed as bold. This is also an HTML element: <body> This is my first homepage. <b>This text is bold</b> </body>This HTML element starts with the start tag <body>, and ends with the end tag </body>. The purpose of the <body> tag is to define the HTML element that contains the body of the HTML document. Tag Attributes Tags can have attributes. Attributes can provide additional information about the HTML elements on your page. This tag defines the body element of your HTML page: <body>. With an added bgcolor attribute, you can tell the browser that the background color of your page should be red, like this: <body bgcolor="red">. This tag defines an HTML table: <table>. With an added border attribute, you can tell the browser that the table should have no borders: <table border="0"> Attributes always come in name/value pairs like this: name="value". Attributes are always added to the start tag of an HTML element. -------------------------------------------------------------------------------- Quote Styles, "red" or 'red'? Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed. In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes: name='Vicky "cricket" Ray'
  8. Dear FriendsI have been trying to connect Ms Access using PHP for couples of days. Finally I have done it. It was dome using Open DataBase Connectivity, popularly known as ODBC (pronounced as separate letters). With an ODBC connection, you can connect to any database, on any computer in your network, as long as an ODBC connection is available. Here is how to create an ODBC connection to a MS Access Database: Open the Administrative Tools icon in your Control Panel. Double-click on the Data Sources (ODBC) icon inside. Choose the System DSN tab. Click on Add in the System DSN tab. Select the Microsoft Access Driver. Click Finish. In the next screen, click Select to locate the database. Give the database a Data Source Name (DSN). Click OK. Note that this configuration has to be done on the computer where your web site is located. If you are running Internet Information Server (IIS) on your own computer, the instructions above will work, but if your web site is located on a remote server, you have to have physical access to that server, or ask your web host to to set up a DSN for you to use. -------------------------------------------------------------------------------- Connecting to an ODBC The odbc_connect() function is used to connect to an ODBC data source. The function takes four parameters: the data source name, username, password, and an optional cursor type. The odbc_exec() function is used to execute an SQL statement. Example The following example creates a connection to a DSN called northwind, with no username and no password. It then creates an SQL and executes it: $conn=odbc_connect('northwind','',''); $sql="SELECT * FROM customers"; $rs=odbc_exec($conn,$sql); -------------------------------------------------------------------------------- Retrieving Records The odbc_fetch_rows() function is used to return records from the result-set. This function returns true if it is able to return rows, otherwise false. The function takes two parameters: the ODBC result identifier and an optional row number: odbc_fetch_row($rs) -------------------------------------------------------------------------------- Retrieving Fields from a Record The odbc_result() function is used to read fields from a record. This function takes two parameters: the ODBC result identifier and a field number or name. The code line below returns the value of the first field from the record: $compname=odbc_result($rs,1); The code line below returns the value of a field called "CompanyName": $compname=odbc_result($rs,"CompanyName"); -------------------------------------------------------------------------------- Closing an ODBC Connection The odbc_close() function is used to close an ODBC connection. odbc_close($conn); -------------------------------------------------------------------------------- An ODBC Example The following example shows how to first create a database connection, then a result-set, and then display the data in an HTML table. <html> <body><?php $conn=odbc_connect('northwind','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM customers"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQL");} echo "<table><tr>"; echo "<th>Companyname</th>"; echo "<th>Contactname</th></tr>"; while (odbc_fetch_row($rs)) { $compname=odbc_result($rs,"CompanyName"); $conname=odbc_result($rs,"ContactName"); echo "<tr><td>$compname</td>"; echo "<td>$conname</td></tr>"; } odbc_close($conn); echo "</table>"; ?></body> </html>
  9. Dear FriendsHow to scan data into applications with a barcode scanner?Hi, I need help with the barcode scanner and reader. I am new to visual basic programing. Can any one help me with this. I have WCS 3900 scanner from wasp technologies. I need an application written in Microsoft Visual basic which can scan, read and then display it moreover save it in database for later use. Basically i am tring to build a program for a Mobile phone store for that the application need to read the barcode. I would be very much thankful if some one comes to my resque...bye..
  10. Dear szupieI am very much thrilled knowing about the spiders. It has exited a great deal and I want to know more about the spiders you talk about. How these spiders are built? Which languages are used? I have come to know that it is related to the Meta tag of HTML. It is true? Please answer my queries. I am waiting for your answer eagerly. Bye
  11. Hey TobiasYou said that the book has every thing to get started. Does the companion CD have Visual studio .net in it or Vb.net in it? If yes please let me know. Then I will buy the book. Thank you..
  12. Dear TavoxPeruI could not understand the meaning of the message which you tried to convey. Did you turned on the safe mode in the PHP configuration file, php.ini. You can find it under Windows folder if you are using Microsoft Windows. By default safe mode is turned off. The PHP safe mode is an attempt to solve the shared-server security problem. If this does not solve you problem then you must specify the error you are getting. Till then bye…
  13. Dear champ_rockWhat is Microsoft Virtual Pc? What can be done using this software?
  14. Dear FriendsWhen using WINDOWS XP, and while in Windows Explorer, very often when attempting to drag a file from Explorer to the folder you want to move it to, an error message will pop up saying: Windows Explorer has encountered a problem and needs to shut down...which usually freezes up Explorer..and you have to open it up and try to do the function of dragging the file again. As well...in some cases, when that error shows up, almost instantly after closing it, which usually means you have to do the Control-Al-Del thing opening the task list in order to close the folder in Explorer totally and start all over. Do you know what causes such a problem to occur? It is very frustrating.
  15. Yes, you are absolutely right. It’s not at all free. A friend of mine gave me this compiler and I can tell you it a very good one. I would like everybody with knowledge of COBOL to contribute here and I would like to request the moderators to open a new forum for COBOL like there are for other programming language. COBOL might not have any role in today’s world but it was a very effective tool and it will help young ones to know about a very good programming language. Bye.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.