Hi All
I am working on one script in which I have to create one image based on given text.
Basically I have to place those texts on various places of the generating images.
Up to this my work done. Below is the code for that.
header ("Content-type: image/jpeg");
$handle = imagecreate(415, 588) or die ("Cannot Create image");
$inve...
when you upload files, you can then get the necessary data from $_FILES
files contains the list of file inputs, where each one has a field like [type]
for example:
Array
(
[file1] => Array
(
[name] => 'MyFile.txt'
[type] => text/plain //where does this come from?
[tmp_name] => /tmp/php/p...
here is link to documentation: http://php.net/manual/en/class.domdocument.php#domdocument.props.documenturi
But I do not understand is this setting a value that this object reveal, or is this setting that user can change ?
Has this value any effect on html parsing by loadHTML metod ? Can it by used to absolutize all relative links in p...
I would like to briefly open up my computer and allow my business partener to see what I've been developing on the my localhost. I understand there are probably some security issues with this but I only want to open up my computer for a few minutes...
What do i need to setup on the following interfaces to do this?
my wireless router
w...
I make a post request to the the page getremote.php with post data but the $_POST array seems to be empty. Would be grateful if anyone can tell me what I've done wrong.
The javascript code to make the request is
var postdata = "Content-Type: application/x-www-form-urlencoded\n\nedits=" + this.createEditXMLtext(this.editXMLstruct);
var...
There's a few tutorials and classes out there but they no longer appear to work since Twitter changed to oAuth.
How do I send a tweet from PHP, in the most basic way possible?
For example, the 'old' way using the MyTwitter class was as follows:
require_once('MyTwitter.class.php');
$twitter = new MyTwitter('username', 'password');
$me...
I have to make connection to the DB and Insert a row based on the data that the SWF sent me...
I will need to make it so that the SWF->PHP part is secure by not letting users tamper with data.
I don't want to use SSL because its not a suitable solution... what other method is available?
...
I have a string called $gallery, $gallery is a list of image URLS The image urls are seperated by a semi- colon ;. Example
http://www.website.com/image1.jpg;http://www.website.com/image2.jpg;http://www.website.com/image3.jpg
How can I split this up and place each url in an image tag, I suppose using preg_split?
Thanks
...
I realise I can do this with CURL very easily, but I was wondering if it was possible to use file_get_contents() with the http stream context to upload a file to a remote web server, and if so, how?
...
Hello all,
I am trying to fix an error for a friend in his site that someone else has written and I am having a real hard time with one of these errors. There is functionality to check wether a user can use a username via AJAX, the response is XML. However, the XML returned has an error in it.
XML Parsing Error: XML or text declaration...
Hello,
Is there a way to display external images with PHP having cache?
I want display images like:
www.domain.com/safe_image.php?url=external.site.jpg
Basically like what Facebook does.
What's best way to achieve this?
Thanks.
Edit
This is my code now:
$image_url = $_GET['url'];
$ch = curl_init();
$timeout = 0;
curl_setopt ...
I am developing a website that many pages share the same header/footer/sidebar/topbar.
Say I have three pages: one/index.php, second/index.php, third/index.php. They all share the same header/footer/sidebar.
The problem is where should I put the header/etc and its corresponding css file, since a piece of html code could not import css...
What would be the best sql to get data out from the table below as follows
Example table
id name buyer amt
1 per disney 10
1 per marie 12
1 per clarence 11
2 pella Magnus 5
2 pella Olof 2
2 pella Asa 4
3 chris Lotta 6
3 chris Wayne 3
...
How can i only save one profilevisit per hour? So if you visited at 10:10 then it wont save when you view the profile at 12:10 ?
My code right now that saves evrytime you visit:
$date = time();
$BuID= mysql_real_escape_string($v["id"]);
$uID= mysql_real_escape_string($showU["id"]);
mysql_query("INSERT INTO users_profilevisits (uID, BuI...
I've got to sort a list of Reservations (they're coupled to an event by defining a belongsTo association) by the last name of the person who registered the ticket.
I do this in cakePHP:
$reservations = Set::sort($eventinfo['Reservation'],'{n}.last_name','asc');
This works, but some users input their data in all lowercase, which makes...
Hello,
I have to create an automatic weather including rain, snow, clouds, fog and sunny.
Depending on the season I need to set a percentage for all weather: the forecast will be updated 3 or 4 times during a day.
Example:
Winter | Rain: 30% Snow: 30% Sunny: 10% Cloudy: 10%, Fog: 20%
I do not know how to implement a random condition ...
Hello there kind people.
I've installed Wordpress here http://www.trsmithroofing.co.uk/flat_roof_blog and I've noticed that URL re-writes are working nicely.
Here's an example of one.
http://trsmithroofing.co.uk/flat_roof_blog/index.php/2010/10/single-garage-flat-roof/
Knowing this works, I'm wondering why I cannot get re-writes t...
i have got 5 php pages which are question papers (MCQ's).
the user is provided with 1 of the papers...which he answers and submits...it then goes to AnsCheck.php ...in AnsCheck.php i need to understand from which page i.e from which of the 5 papers the request was received so that i can proceed with the checking ...how do i obtain the p...
How do you detect the last record in a result set when using php and mysql. In ASP its EOF (End of File). Whats the php/mysql equivalent? I'd like to know the last record so i can draw a line after it or close a tag or anything else.
...
This is possible in Symfony with some routing magic but in Zend I'm not sure how to do this.
I want to make this url
http://example.com/unit/view/id/[15]
look like this instead
http://example.com/unit/[15]/view/[name]
where unit/view is the controller/action and id/15 is parameter key=>value, and [name] is the name of the unit be...