|
oh my god! I spent whole night trying to find out where is the issue!
Thank you so mucn
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
Hi friends i hope all is well
i need some help from all of you
i have an project sale managment system in php that works with wamp server 2.0 and run on local computer
security is that it just works on single pc when ever i try to run it on any other pc
when i login on other pc with same user name and password
it open a fake page instead of original Main manu page which contains all manues and header footers
i just want to run it on all computers but it work with single pc
index page raffer to D:\soft2\www\admin\config\connection.php
which have these codes
<?php
eval(base64_decode(
?>
please please reply me
|
|
|
|
|
This code block decodes to:
$codelock_code = "JGNvbm4gPSBteXNxbF9jb25uZWN0KCJsb2NhbGhvc3QiLCAicm9vdCIsICJ0YWhpcmEiKTsNCm15c3FsX3NlbGVjdF9kYigiamFsY!kZXIiLCRjb25uKTsNCg==";
$codelock_code = str_replace("@","CAg", $codelock_code);
$codelock_code = str_replace("!", "W5", $codelock_code);
$codelock_code = str_replace("*", "CAgI", $codelock_code);
$codelock_code = base64_decode($codelock_code);
eval($codelock_code);
This second block decodes to:
$conn = mysql_connect("localhost", "root", "tahira");
mysql_select_db("jalander", $conn);
So it looks like the other PC you're trying to run it on either doesn't have a local MySQL instance, has a different root password, or doesn't have a database called "jalander".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am trying to update the PHP on my web server. On my backup server I updated from 5.2 to 5.4 and the result is kind of bizarre.
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<!--#include virtual="_assets/header.shtml" -->
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<!--#include virtual="_assets/marquis.shtml" -->
The includes above worked correctly prior to the update. This is what I see when viewing the page source in my browser:
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<div class="header">
<!-- More HTML code -->
</div><!-- end .header -->
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<div id="marquis">
<!-- coming soon -->
</div>
After the update I see this:
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
The bizarre part is that the includes get injected seemingly at random further down the page and in the middle of source that is generated by PHP code. Is there a DOCTYPE or PHP configuration setting that needs to be changed?
Thanx,
>>>-----> Mike
|
|
|
|
|
I had not really given much thought to the server-side includes. They have always worked.
I did some research though and found that SSI is essentially a separate interpreter. The order of whether SSI is included inside PHP or vise-versa matters (apparently depending on your version of PHP).
I also found that comment begin and end tags are more strict after I made my updates.
<!--div>
some stuff
</div><!--end div-->
While I know it is bad form, commenting out a "div" as shown above worked prior to the PHP update. After the update, the text "
|
|
|
|
|
I have a class like this :
class Packet {
private $headerSize;
private $signature;
private $version;
private $highSessionID;
private $lowSessionID;
private $commandID;
private $dataSize;
}
i want to write reliable udp protocol ,
i want to know how can i split an instance of my packet class into chunks and send them with socket_sendto function
|
|
|
|
|
kleymanx90 wrote: i want to write reliable udp protocol , Then you will need to include a lot of error checking. Why not use TCP which is reliable? When sending the data, you can send it in one chunk with field separators between each section, or as individual chunks. In either case you should add a header which identifies the field type and gives its length, and possibly a trailer containing a CRC check digit. In that way the receiving code should be able to unpack it correctly.
Veni, vidi, abiit domum
|
|
|
|
|
Because UDP is faster than TCP . I have an UDPPacket class too.My UDPPacket includes my packet class and UDP header .
I want to send chunks of video for streaming and maybe some XML files .
I found pack function and I packed all fields but I want to know is there anyway to pack an object and then split into chunks ?
|
|
|
|
|
Packing and splitting is exactly the same whatever the data, you just need some metadata with each chunk so the receiver can recreate the original object. I take it you also understand that UDP does not guarantee delivery of any message, nor does it guarantee the order in which messages may be transferred.
Veni, vidi, abiit domum
|
|
|
|
|
kleymanx90 wrote: Because UDP is faster than TCP
It's faster because it doesn't include the overhead of making sure transfers get to where they're going. If you try to make UDP reliable, you're trying to make UDP act like TCP, which will inevitably make it slower.
|
|
|
|
|
kleymanx90 wrote: reliable udp protocol ,
Those two don't go hand in hand. UDP was designed to be fast, not reliable. Reliability requires error checking and handling, in another words, you'll end up making UDP something it's not. If you need reliability, use TCP, that already has all of the error checking and re-transmissions built into the protocol.
|
|
|
|
|
Hello!
I am developping a website.i want to display images that are sliding unfortunately i failed to achieve that.
need a your help so that i can get php codes to display those images.
question 2: how to create admin page in MYSQL??
|
|
|
|
|
To display sliding images on your browser, you have to code it using client-side script like JavaScript or JQuery. PHP is server-side script that performs application logics, not for this purpose. You can learn from this site: http://www.w3schools.com/jquery/jquery_slide.asp
I do not understand your second question.
|
|
|
|
|
HY!
i have an issue in php session. the issue is that the session work fine in index page but the username can't show in other pages.
lohin.php code
<?php session_start();
include './header.php';
include 'connection.php';
if(isset($_POST) && count($_POST)>0) {
$user = $_POST['username'];
$pass = $_POST['password'];
$sSQL = "SELECT * FROM ulog WHERE User_Name ='".$user."' AND Password = '".$pass."'";
$result = mysql_query($sSQL) or die(mysql_error());
$row=mysql_num_rows($result);
if($row==1)
{
$_SESSION['username'] = $_POST['username'];
header('Location:index.php');
}
}
else
{
header("location:login.html");
}
?>
index.php code
<?php session_start();
include './header.php';
if (!isset($_SESSION['username']))
{
header('Location:login.html');
}
?>
<div id="welcome">
<h4> Welcome <?php echo $_SESSION['username']; ?> <a href="logout.php">Logout</h4></a></p>
</div>
<div id="content">
<p>Learn to Design and Develop Website.<br />
Learn Programing From Tutorial's teaches you the fundamentals of web development and not just programming. You will learn how to create amazing websites through programming and design tutorials. The web development tutorials on your left are designed for you to move through them in order to have an overall understanding of web design and development.</p>
</div>
<?php include './footer.php'; ?>
the code i use in other pages which is not working is..
<?php session_start();
include 'login.php';
if (!isset($_SESSION['username']))
{
header('Location:login.html');
}
?>
the above code is used in other pages but it is not working..
what type of code i need to access username in all pages..
|
|
|
|
|
I think you should not include "login.php" in the other pages.
<?php session_start();
include 'login.php';
if (!isset($_SESSION['username']))
{
header('Location:login.html');
}
?>
ringunger
|
|
|
|
|
I have developed an online Movies website. I also developed my own media player in separate page so i want to know how can i play different movies using this single media player or how can i link different movies with this single media player.
Waiting for your suggestions.
|
|
|
|
|
I need to create a search for (wordpress site)form having 2 input fields. 1. A dropdown field, consisting all categories. and 2. a basic text input which would search the whole site.
I was using a plugin (advance-wp-query-search-filter.1.0.10) but it is not working. When i select a category, the meta title and the meta description is getting generated but no posts is getting displayed.
I was trying to get all the categories and combine with the single input text search button. code for getting all the categories into a dropdown menu:
<li id="categories">
<h2></h2>
<form action="<?php bloginfo('url'); ?>" method="get">
<div>
=1&hierarchical=1&taxonomy=coupon_category
<input type="submit" name="s" value="view" />
</div>
</form>
</li>
what i want is, there should be 2 inputs (dropdown & text input) and a common search button which would submit both or any one input which is provided by the user.
My single input text search button is working fine. How can i combine multiple input fields ?
<form role="search" method="get" id="searchform" action="<?php bloginfo('siteurl'); ?>">
<div>
<label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" id="s" />
=1&hierarchical=1&taxonomy=coupon_category
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
The above code, displays a search box with 2 inputs, which are dependent on each other. I want it to work independently having a common submit button. if i input a category and search, the search results should be according to the category, and if i search only a normal text input, the result should be according to the input text. and if i input both the fields, i want the search result to get populated with respect to the input text box.
|
|
|
|
|
how to status active inactive with ajax
|
|
|
|
|
My SELECT query works fine when I've got records. Whether there are no records, or not in the result set I get a warning
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given I've tested the result agains
FALSE, NULL, null (both null and NULL seem to be used in examples and the manual)and calling
is_null($result) but I don't pick it up. Why? I just want to be able to differ between technical failure and return of zero records.
$query = 'SELECT CommentId, ParentId, Subject, Name, DATE_FORMAT(TimeStamp,"%k::%i %d-%m-%Y (GMT)"), Comment FROM commentdata WHERE ArticleId = ' . $ArticleId . ' ORDER BY COALESCE ( ParentId, CommentId)';
$result = mysqli_query($connect, $query);
if(TRUE == $result)
{
echo 'TRUE returned on query for data: ' . mysqli_error($connect) . '<br/>';
}
if(FALSE == $result)
{
echo 'FALSE returned on query for data: ' . mysqli_error($connect) . '<br/>';
mysqli_close($connect);
die("Connection closed after FALSE returned on query for data: " . mysqli_error($connect));
}
if(NULL == $result))
{
echo 'NULL returned on query for data: ' . mysqli_error($connect) . '<br/>';
mysqli_close($connect);
die("Connection closed after NULL returned on query for data: " . mysqli_error($connect));
}
if(null == $result))
{
echo 'null returned on query for data: ' . mysqli_error($connect) . '<br/>';
mysqli_close($connect);
die("Connection closed after null returned on query for data: " . mysqli_error($connect));
}
if(is_null($result))
{
echo 'NULL returned on query for data: ' . mysqli_error($connect) . '<br/>';
mysqli_close($connect);
die("Connection closed after NULL returned on query for data: " . mysqli_error($connect));
}
$rowcount = mysqli_num_rows($result);
modified 10-Sep-13 10:03am.
|
|
|
|
|
Hello Sir.
I am trying to convert the MYSQL data into XML using the following code :
\n";
$output .="<tables>\n";
// iterate over each table and return the fields for each table
foreach ( $tables as $table ) {
$output .= "\n";
$result_fld = mysql_query( "SHOW FIELDS FROM ".$table, $dbhandle );
while( $row1 = mysql_fetch_row($result_fld) ) {
$output .= "<field name="\"$row1[0]\"" type="\"$row1[1]\"";
$output" .="($row1[3]" =="PRI" )="" ?="" "="" primary_key="\"yes\"">\n" : " />\n";
}
$output .= "\n";
}
$output .="\n";
// tell the browser what kind of file is come in
header("Content-type: xml");
echo $output;
$handle = fopen("MyXML.xml", "w") or die("unable to create file");
file_put_contents("MyXML.xml", $output);
fclose($handle);
// close the connection
mysql_close($dbhandle);
?>
Sir , I have 2 questions :
how can i update the code in order to show the content of the data in MYSQL ? This code is only showing the table and fields name and the fields types.
How i can update the code in order to show the foreign key and relation between tables ?
It is Showing only the primary key .
Help Please.
Thank you
|
|
|
|
|
I need to pass client credentials into a .asmx webservice and return data using php. How do I input/read from this xml file?
POST /Topblah.asmx HTTP/1.1
Host: client.blah.co.za
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.blah.co.za/CheckClient"
="1.0"="utf-8"
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CheckClient xmlns="http://www.blah.co.za/">
<PolicyNr>string</PolicyNr>
<IDNumber>string</IDNumber>
</CheckClient>
</soap:Body>
</soap:Envelope>
|
|
|
|
|
i want to initialize a php session variable when user clicks on a link, using a php function or any other way.
for example
<a href="http://bytes.com/submit/g/#" onclick="phpfunction()"> link</a>
|
|
|
|
|
u can use ajax.
u must create a function in your javascript code that send ajax request to your php file and get response from that.
function getXMLHttpRequest()
{
if (window.XMLHttpRequest) {
return new window.XMLHttpRequest;
}
else {
try {
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
catch(ex) {
return null;
}
}
}
function do_somting(){
xhr= getXMLHttpRequest();
xhr.onreadystatechange=function()
{
if(xhr.readyState==4 && xhr.status==200)
{
}
}
xhr.open("GET","file.php",true);
xhr.send(null);
}
and in php file that contains php functions.
<?php
your php code's goes here
echo result;//=responseText in js file
?>
|
|
|
|
|